<code>awk</code> again,<br>input any suite of values separated by <code>,</code> and newlines,<br>output a fixed-width csv:
awk '{b=(b?b",":"")$0}0==FNR%n{print b;b=""}END{if(b)print b}' RS='[,\n]' n=4 <<END
Hello
Hi,Hullo,Hammers,Based
Random
END
Hello,Hi
Hullo,Hammers
Based,Random