Well, here's what I do. I have objects 200 to 300 reserved for enemies. Whenever my game needs a new enemy, I do a for/next loop to find an object number not in use and call my CreateEnemy function. I then use a for/next loop to loop through the objects, and if the object exists, then call the function to update the AI for it. My code for updating the AI looks something like this:
For x=200 to 300
if object exist(x)
updateAI(x)
endif
next x
Function updateAI(objNum)
point object at player when player is close enough
move enemy towards player
shoot bullets/lasers at player
dodge player's bullets
etc.
(wouldn't it be nice if those were really DB commands?) :)
endfunction
There are probably better ways to do this, but this is how I do it and it works quite well as long as you don't have too many enemies roaming around.