That's how maps are done in RPGs. You have two arrays: one to draw the map, and one to designate boundries, like so.
Array 1: D = Dirt, G = Grass
GGGDGGG
GGGDDDG
GGGGGDG
GGGGDDG
DDDDDDD
WWWWWWW
Array 2: X = Boundary
XXXDXXX
XXXDDDX
XXXXXDX
XXXXDDX
DDDDDDD
XXXXXXX
From the first array, you replace the letter with the tile image you want, and in the second array, you see if the player can move to the designated tile. This is why arrays and for loops would be really useful in GameMaker, although I guess you could use a REPEAT loop to cycle through an array.
Ghost
That's exactly how collision works in V6:
gridlayout$ = "1 1 1 1 1 0 1 1 0 1 0 0 0 1 1 0 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 1 1"
moveXY = 0
moveXY = 7 * moveY
moveXY = moveXY - 7
moveXY = moveXY + moveX
newtile$ = WORD$ gridlayout$ moveXY
IF newtile$ = "0" THEN newtile$ = "empty"
IF newtile$ = "1" THEN newtile$ = "wall"
IF newtile$ = "2" THEN newtile$ = "portal"
Hopefully 4.0 will be able to draw sprites fast enough for the above method to work too.