in post-pandemic new world we can solve this with:
=INDEX(FLATTEN(A2:A3&" "&TRANSPOSE(B2:B4)))
to account for future expansion we can do:
=INDEX(FLATTEN(FILTER(A2:A; A2:A<>"")&" "&TRANSPOSE(FILTER(B2:B; B2:B<>""))))
for 3 columns:
=INDEX(FLATTEN(FLATTEN(
FILTER(A2:A; A2:A<>"")&" "&TRANSPOSE(
FILTER(B2:B; B2:B<>"")))&" "&TRANSPOSE(
FILTER(C2:C; C2:C<>""))))
4 columns:
=INDEX(FLATTEN(FLATTEN(FLATTEN(
FILTER(A2:A; A2:A<>"")&" "&TRANSPOSE(
FILTER(B2:B; B2:B<>"")))&" "&TRANSPOSE(
FILTER(C2:C; C2:C<>"")))&" "&TRANSPOSE(
FILTER(D2:D; D2:D<>""))))
for more see: https://stackoverflow.com/a/74160711/5632629