MeshDataTool and ArrayMesh allow you to generate mesh data dynamically. MeshDataTool is more abstract and easier to use, ArrayMesh is more low-level.
You can then add a MeshInstance to the scene, with it's mesh property set to the ArrayMesh you built or the ArrayMesh built from the MeshDataTool. Generating a mesh once and using it multiple times should be pretty efficient, mesh streaming is more difficult to get right.