# Array Built-ins

| Function | Description | Meta |
| --- | --- | --- |
| `array.concat` | `z := array.concat(x, y)`  Concatenates two arrays.  **Arguments:**  `x` (array\[any\])  the first array  `y` (array\[any\])  the second array  **Returns:**  `z` (array\[any\])  the concatenation of `x` and `y` | Wasm |
| `array.flatten` | `flattened := array.flatten(arr)`  Non-recursively unpacks array items in arr into the flattened array. Other types are appended as-is.  **Arguments:**  `arr` (array\[any\])  the array to be flattened  **Returns:**  `flattened` (array\[any\])  array flattened one level | [v1.13.0](https://github.com/open-policy-agent/opa/releases/v1.13.0) Wasm |
| `array.reverse` | `rev := array.reverse(arr)`  Returns the reverse of a given array.  **Arguments:**  `arr` (array\[any\])  the array to be reversed  **Returns:**  `rev` (array\[any\])  an array containing the elements of `arr` in reverse order | [v0.36.0](https://github.com/open-policy-agent/opa/releases/v0.36.0) Wasm |
| `array.slice` | `slice := array.slice(arr, start, stop)`  Returns a slice of a given array. If `start` is greater or equal than `stop`, `slice` is `[]`.  **Arguments:**  `arr` (array\[any\])  the array to be sliced  `start` (number)  the start index of the returned slice; if less than zero, it's clamped to 0  `stop` (number)  the stop index of the returned slice; if larger than `count(arr)`, it's clamped to `count(arr)`  **Returns:**  `slice` (array\[any\])  the subslice of `array`, from `start` to `end`, including `arr[start]`, but excluding `arr[end]` | Wasm |