If you have a 2D array you can transpose it and than feed the array to a for loop, autoindexing now columns.
feed this to a format into string with a format string from a 1D array of format strings outside the for loop.
use this to generate a 2D array of strings (transpose again and concat this to a string.
try this in a simple example.
greetings from the Netherlands