There is no shame in asking about how someone might implement things.
I doubt SecretCollect was done with a map like you describe - I suspect it was simply a list of types of rectangles, and the flash collision detection. You’d have to do all of that yourself, there’s no collision detection in Codea (yet!).
One of the example programs (I forget the exact one - my ipad is currently being held hostage by my 3-year-old. It’s the one with the “Hero” class) does exactly what you describe above - I’d take a look at that for starters.
In a nutshell, to do what you’re doing, you might have a part of draw() that looks like this (assume your table of tables above is called “level”):
for i=1, #level do
row = level[i]
for j=1, #row do
t = row[j]
sprite(spritelist[t], j*25, i*25)
end
end
That’s the list of the sprites (or whatever) you wanted to draw on each square. If you weren’t using sprites, you might simply have colored rectangles, and replace the sprite() call in draw with “color(spritelist[t])” and a rect() call.