Mixed-Integer Models for Nonseparable Piecewise-Linear Optimization: Unifying Framework and Extensions