Support 3-dimensional iterators in from_array