Looping or spherical world?

I wish to create a 3D first person world, in which the player, once they reach one end of the map are unknowingly transported back to the opposite end, or a spherical world with a surface where the player can walk on while still experiencing gravity like normal. Unfortunately I couldn’t find a good solution for doing that. Any ideas would be appreciated.

You have to write your own code for this in any engine in existence.

example would be an array of tiles where you can set up a neighbor system so you can reference any tiles in a nine block or maybe 5 block system.

then you would make a page system when player enters a new block there tiles update and send it to render.