I'm trying to procedurally generate a couple prefabs for a game i'm making in 3D

I’m trying to figure out how to create a procedurally generated map with 10x10 prefabs, I know that i have to use the Instantiate method but how would i come up with the correct coordinates for the next few prefabs, so that the player never catches up with the edge of the map. I also want to include a random selector for the prefabs that way it’s not always the same prefab being created and there is a little bit of “spice” to the world. I’ve been trying to figure this out for a couple hours and I’m stumped… And i don’t want to have to use colliders but if it is impossible to do otherwise, i will. Also i dont’ want to have to use Colliders, but if there is no other way, i will (duh)

You can create a script called PrefabInfo like this:

class PrefabInfo {
	public Vector3 size;
}

And you can use it to store infos about the size of that particular prefab, in this way you don’t have to deal with calculations but just use the raw values.

//This controls the amount of tiles spawned
public int squared = 10;
//This is the array of prefabs you want to spawn
public GameObject prefabs;

for(int i = 0; i < squared; i++){
    for(int j = 0; j < squared; j++){
        //Instance the prefabs along the tiles, randomly  choosing a prefab in the array by the range of the length of the array. 
        GameObject spawnedObj = Instantiate(prefabs[Random.Range(0, prefabs.Length)], new Vector3(i, 0, j), Quaternion.identity);
          //Change the rotation if you want to "Spice it up" 
    }
}