Making Voxels in App?

I got the 3D Apple Games By Tutorials. I thought it might have more info on voxels. But I’m trying to construct the voxel image in my app. I think I need to create and fill in an MDLVoxelArray that contains all the MDLVoxelIndex data. But I can’t seem to add this data to the array. I only manage to get one data point. I assume I need to append the MDLVoxelIndex(s) to the MDLVoxelArray but I can’t seem to do that. Maybe I’m thinking about all this wrong? It seems the usual application is to create these voxel models in other software and import them as objects. Which is what the tutorial does. But my app is trying to use them to represent some data and needs to create the display as it runs. My display method is similar to the Panda example by Ooper-Shlab and Apple and appears to work other than the lack of data. I don’t want to simply go straight from just an array of vector_int4 to the SCNBoxes because I want to take advantage of some of the things MDLVoxelArray is supposed to do.