In this example I lose the offset along the first dimension as the result is a normal array with 1-based indexing. Is there any way to obtain the result as an offset array without preallocating the result? On a related note, can we convert an ordinary array to an Offset Array by adding the information about its indices?