You should be able to use a simple FOR loop that indexes through all your 2D images and adds them sequentially to a shift register. Another possibility would be to feed it through 2 autoindexing FOR loops, containing a SUM operator.
The exact procedure heavily depends on the order in which your 3D array is indexed. It might be easier to slice it using "array index" with some indices unwired.
Do you have a small example array with a few layers? How many bits do you have per pixel and what is the data type? You might need to watch out for overflow.