I guess its doable when you try to make it look like the grimmrock or the older eye of the beholder games.
you could use a lua table which holds also lua tables inside (To get some kind of 2d array)
Lets say your 2d array has a dimension of 40*40 . Via an algorythm you now can assign randomly 1 or 0 to a field which indicates if the field is walkable or not. maybe this algorythm should consider the (up to) 8 surrounding fields, too, so that floors can be created and a connected "dungeon" as a result.
After that you may have a randomly generated grid with floors (1) and walls (0).
VS could read this table and displays -depending on your imaginary position on the map and your surronding values - the "fake 3D" dungeon walls and stuff.
you also could run another function to populate the floors with enemies or loot. . .