I have used mesh cubes as blocks, but after a few thousand the fps goes down.
How can I use an array instead of meshes without storing a Vector of 3 digit positions for every single block which will decrease performance?
There is a lot of optimization that needs to go into a voxel/minecraft style game.
Your first attempt might be using MultiMeshInstance3D; this stores an array of position, scale, and rotation (a Transform3D) to display your cube mesh at each point. This works very fast because it’s in a format the GPU can operate over quickly.
This probably won’t be enough, you could go from thousands of cubes to maybe hundreds of thousands, but most of these cubes will be blocked by other cubes, such as underground blocks. You need to implement greedy meshing instead, generating a simplified mesh per chunk. If your chunk is a 16x16x16 block of cubes, it could be reduced to a single cube that’s 16 units big.