Generalize MacExpr / MacPat / MacItems

Might be a bit clumsy ...

Closes #17637