# Use arrays

> Use arrays to store multiple values.

An array is a collection of values or references of the same type. You can add, remove, and reorder elements in an array, and edit their values.


**A vector array of five elements with X, Y, and Z fields for each element.:**
![](/api/media?file=/engine/6000.7/media/images/ArrayInspector.png)

You can add and remove elements one at a time with the **+** and **-** buttons.

Some arrays have a **Size** field. You can use this field to add or remove multiple elements at once:

* To add elements to the end of the array with the same values as the last element, increase the **Size** value.
* To remove elements from the end of the array, decrease the **Size** value.

> **Tip:**
>
> When you add an element to the array, the Unity Editor reuses the values of the previous element. To set up an array with similar values, add the first element and then change the array's size to copy its value to subsequent elements. You can then edit only the values that differ.

To rearrange elements, drag the element headers up or down.

## Additional resources

* [Inspecting scripts](/engine/6000.7/manual/scripting/get-started/inspecting-scripts.md)
* [ArrayUtility](/engine/6000.7/script-reference/unityeditor/arrayutility.md)
