I guess you'd just have something like
if Object.Y+viewingDistance<leftEdgeY+viewingDistance and Object.Y>leftEdgeY then create object at same X and for Y rightEdgeY+(Object.Y-leftEdgeY)
Then change edges and +es to -es to do copy the other side and same thing but with X to get up and down edges.
Probably would want the objects that get mirrored so in 1 family so you don't need to make it for each object separately.
Or you could just do it manually.