I streamline the syntax by putting all the term data in a comma separated list in the 2nd argument. I use listofitems
to parse the list (the default list separtor is a comma, but that could be changed). The package's \foreachitem
macro allows easy regurgitation.
\documentclass{report}
\usepackage{listofitems}
\newcommand\mpoly[2]{%
\readlist\myterms{#2}%
\foreachitem\x\in\myterms{(#1+\x)}%
}
\begin{document}
$y_1 =\mpoly{x}{1,2}$
$y_2 =\mpoly{x}{1,2,3}$
$y_3 = \mpoly{x}{1,2,3,5}$
\end{document}

This can be generalized to a more inclusive format, with the use of nested parsing, to allow multiple variables as well as setting the +/- operation:
\documentclass{report}
\usepackage{listofitems}
\newcommand\mpoly[1]{%
\setsepchar{*/+||-/,}
\readlist\myterms{#1}%
\foreachitem\x\in\myterms[]{
\foreachitem\y\in\myterms[\xcnt,2]{(\myterms[\xcnt,1]\mytermssep[\xcnt,1]\y)}%
}%
}
\begin{document}
$y_1 =\mpoly{x+1,2 * y-3,4}$
$y_2 =\mpoly{x+2,3 * x-4,5,6,7}$
$y_3 = \mpoly{x-1,2 * y+3,5 * z-6}$
\end{document}

\mpoly
always be either a single letter or a single number, or could they be more general inputs? And how is LaTeX supposed to "know" if some argument in curly braces is (a) still another argument of\mpoly
or (b) some other document element? – Mico Apr 25 '18 at 10:59