Creating 3D objects and slice them to obtain 2D numpy array

All these operations are really easy to do in 3D Slicer, either using the GUI or by Python scripting. For example, you can create detailed, anatomically very accurate models directly from DICOM images by a few clicks and get the voxels as a 3D numpy array. Or, you can import a 3D mesh file that you created elsewhere (using VTK, pyvista, or any modeling software) and get a series of TIFF files by slicing them by copy-pasting this code snippet into Slicer’s Python console.

What are you going to use the slices for? Bitmap 3D printing? Dose computation? Further processing, analysis, segmentation, registration,…? There are tools for these and a lot more in 3D Slicer. If you describe what your overall goal is then we may be able to give you more specific advice.