Edit AllPages

Say I have an array of numbers, and rather than putting them from up to down in a list, I want to put them from left to right in columns. How would I go about doing this? I don’t know how to refer to columns by numbers, and I’d want to be able to do this dynamically (like have the same number of columns as numbers in the array.) Thanks a lot.