I don’t think that can be possible for more than 0-dim or 1-dim as for 2-d case, if the dur is different for each row that will imply that each row will have different number of elements, which is not supported.
Eg.
x = [[1,2,3,4],
     [1,2,3,4]]

dur = [[1,1,1,1],
       [2,2,2,2]] # Notice different for 2nd row.

# Expected output (which is not supported)
output = [[1,2,3,4],
          [1,1, 2, 2, 3, 3, 4, 4]]