Types for describing n-dimensional arrays and index expressions