The ARRAY element specification returns the element from
an array specified by expression.

>>-+-array-variable-------------------------------+--[--expression--]-><
'-CAST--(--parameter-marker--AS--array-type--)-'
- array-variable
- Specifies a variable or parameter of type array in an SQL procedure.
- CAST(parameter-marker AS array-type)
- Specifies the array data type to be used for the parameter marker.
The array data type passed for the parameter marker value must match
this array data type exactly.
- [expression]
- Specifies the subindex of the element that is to be extracted
from the array. The subindex must return a value that is an exact numeric with zero scale or DECFLOAT. Its value must be
between 1 and the maximum cardinality of the array.
The data type of the result is the data type
specified for the array on the CREATE TYPE (Array) statement.
If expression is
null or the array is null, the null value is returned.