Vaank the first method was the way I was suggesting. It gives every empty space an equal chance of getting an enemy with one quick loop through the array.
If you just randomly pick array.x and y locations, you would be picking non empty locations and occasionally be picking the same empty location, so it isn't going to be more efficient - unless your array is huge and you want relatively few enemies.
The first method gives you the potential to set up your array to adjust the possibility for creating enemies in certain areas - you could use a range of numbers to influence where the enemies are: 0 means location is filled, 1 means empty but no chance of enemy, 2 = small chance, 3 = medium chance, 4 = high chance. You could also use different number ranges to indicate what types of enemies can be created in various areas...
But, as always, there are many ways to do things - you just have to decide what works for you and gives you the result you want.