In the question Generate table with dynamic number of columns the OP posed a question to which my initial reaction was "No".
However, now I've run into something interesting which, if I'm reading it right, would fit the bill. From the TeX by topic by Victor Eijkhout (25.2.3):
\noalign{\penalty100}for discouraging a page break (or line break) in between two rows (columns) of an\halign(\valign).
So if I understood the above correctly, for \valign that would read:
\noalign{\penalty100}for discouraging a line break in between two columns of an\valign.
I thought: "That's exactly what was asked for", but couldn't figure out how.
\penalty1000only discourages a line break; to inhibit it you have to say\penalty10000– egreg May 14 '11 at 10:10\hsizeis reasonable. But if I typeset your alignment after\hsize=1ptI don't get any line break, that would instead be present if the inserted penalties were less than 10000. – egreg May 14 '11 at 10:40