Arrays where the index type is a function of the shape type