Games like this(terraria) and Minecraft generate the world procedurally using some noise algorithm(perlin noise,simplex noise,etc),so it doesn't need to save where every object is in memory..
The way I'll do is this:
1)create all the object that can be added into the scene first
2)In the main scene,use 1d simplex noise to calculate the height along the x-axis
3)if it's under the height for generation,I'll create another simplex noise to determine what block to place at that point.
4)create more noise to add more details.U can use your creativity to partition the world and add some rules to determine how u want to design the world,u can take various other factors into account also.
5)for the floating part and some random out of place stuff,I think u can create algorithms to generate them,such as
Btw,in Godot,there's a built in noise called open simplex noise,I'm sure there's many tutorial and documentations online,just go search about it..
Some helpful links:
Hope it helps...I'm not really good at answering,but this is more or less how I generate my world.