The reason I say it's inefficient to pass all the level data though an array every cycle is because once the level is loaded you don't really need the array to keep track of walls and floors and such any more. The array is like a blueprint... but once the building is built you don't need to reference the blueprint to walk around in it... you have real-world walls and floors to see and navigate through.
Imagine the building is your house, and you need to go to the bathroom. Instead of looking down the hall and moving toward the bathroom door, you're looking at the blueprint of your house. Every step you take, you have the contractors tear down your house and build a whole new house around you. As fast as those contractors might be, they really don't need to be doing that, and you don't really need to be looking at your blueprint.
So toss the blueprint and just walk to the bathroom on your own.
As for enemies keeping track of the player position and obstacles, you can give each of them a "mini-array." Let's assume, in a grid-based system where each enemy can move one space, that there are nine choices an enemy can make when moving: One of eight spaces surrounding it, or the space it's currently standing on (i.e., do not move). You only need a 3x3 array to cover all movement options. So you run your algorithm to pick the space to move to, and then go on to the next part of the selection, which is checking for obstacles...
Your enemy has a target space that it wants to move to, so it runs a quick check to see if there is a real-world, physical wall in the way. If there is, do not move (or move to the second best space, etc.). If there isn't, then move to the target space.
Using a mini array like this is much more efficient that keeping track of the entire playing field, and what's better is it's recyclable. You can clear the array and reuse it for each enemy during the enemy AI routine. Once they have their final target coordinates stored in a pvt variable or whatever, they don't need to reference the array any more. The engine moves on to the movement routine, checks the coord stored for them, and just places them there.
I know it's not the example you were looking for, and it might not be exactly suited to your purposes, but maybe it'll give you some ideas on how you can craft your own AI/movement. Hope this helps.
Edit:
Er, yeah. What Ashley said.