A collection type holds some number of values (elements) that are all the same type. The standard library offers a number of versatile collection types, such as Vec and HashMap.

All such collection types are built on top of the array primitive types, whose elements are co-located in memory and are individually accessed using an integer index: