You have the basic idea in the top post. Basically you have a loop for each row and inside there you have a loop for each column. You calculate the X, Y to draw each image based on the index of the two loops and the desired height and width of each image. Just keep in mind that Lua tables are a 1 based array, not 0 based like many other languages and when you start with 1 and you’re trying to calculate the position, you need to subtract 1 to make the math work.
x = (j - 1) * imageWidth + imageWidth * 0.5
So when j is 1 for the first column, it will compute the center of the block correctly. After that, assuming you want them touchable, you would add an event listener to handle touches or taps.
Do you know the size of the images? Do you need to resize the images to make them fit or will they already be the right size?
If you look at the Business Sample App: https://github.com/coronalabs/business-app-sample
One of the pages there is a photo gallery viewer which basically does what you want.
Rob