Add support for non-square variable-sized matrices in all Morton order implementations