Using raycast to prevent collisions when spawning objects in random locations

I need to spawn many objects within a location (NPCs, static objects etc) in a simple 2D game.

I’m using a very naive algorithm to randomly pick a 2D point and check whether that point is within a distance of existing objects.

If I switch to using RaycastAll to detect collisions, will it work as intended? Does RaycastAll work on objects that were just instantiated and haven’t had a chance to have Start() called yet?

(I am aware of smarter algorithms which subdivide into a grid etc, but this question is purely about the raycasting because it is more versatile and easier to implement)