Well, there’s a lot of ways to do this. Admittedly, I’m not fond of your approach, and I’ll explain why in a second, but let’s address your example.
Random Spawning Position: For the method you’re applying here, you’re always going to spawn from above because Y is always 6. If you want to spawn from left and right, Y needs to come closer to 0 and your X needs to always be lower or greater than a number that puts the spawn off screen. So you need more logic rules here, and there are several ways to go about it, but top of my head, you could simply randomly decide direction spawn will come from and use a -x range if left and +x if right OR you could do a -x to +x range and if the spawn exists within a screen range (say -2 and +2) then the x is set to minimum range.
Random Vector of Approach / Set Range of Spawn: you could set a radius of spawn min range of spawn distance, then simply random 1-360 and put your enemy at the min distance in the direction decided by your random number.
Segments: I use this for multiplayer because the random spawning thing creates lots of problems. I divide my play area into a number of screens, and spawns occur from a number of screens away. So 100 units of X = 10 screens, and if I have players in screen 3 and 5, then spawns can only in screen 0-2, 4, 6-9. This is really common in procedural type games.