cuFFT 3d + 1 of variable size

Hey,
I have a problem requiring FFT.
filter -> r2c -> complexmult -> c2r.
I can do it the cufft1d way without much issue.
But it will be nice if possible to do it in n * y * x(y) * z.
For example using n_streams*(y*x(y)cufft(z)) (Also x is variable based on y).
Here is an illustration.
https://imgur.com/f6Ws4K9
Currently it is possible to do 4 loops and assign an 1d array or vector in the 4th loop and do cufft on that.
I can flatten the data in a 1d vector, but the pads number changes along y and cufft3d expects fixed sizes as far as I understand. Any suggestions?

pseudo code:

int N, Y, Z
int X[Y] = {x1, x2, x3}
for(N)
  for(Y)
    for(X)
      cufft1d(data)

I’d like to transform to:

for(N)
  cufft3d(flatvector)