First of all thank you very much, switching all operations to 3D does allow for the use of 5D arrays and solves the problems.
As a followup, still regarding the dataloader output, is it possible to load the nifti images but treat them not as 1 3D with x Depth, but several 2D images, again, ending with a 4D array instead of 5D?