ARRAY_GET takes an array expression as an argument and returns the element value in array_expr that corresponds to the position specified by array_index.
If array_expr is a one-dimensional ARRAY type, the index of the element to be located is defined by an INTEGER or an ArrayVec type that must be within the defined boundaries of array_expr.
If array_expr is a multidimensional ARRAY type, the index of the element to be located is defined using the predefined array type ArrayVec. For more information on the ArrayVec type, see “ARRAY Scope Reference”. The number of dimensions defined by ArrayVec must be between 2 and 5 (the maximum number of dimensions supported) and must correspond to the number of dimensions in array_expr. The values for each dimension are separated by a comma and they must be within the defined boundaries of array_expr.
If the value of array_index references an element of the ARRAY which is in an uninitialized state, an error is returned. To avoid referencing an element of the ARRAY that is uninitialized, set any uninitialized elements to NULL. You can do this with the OEXTEND method. See OEXTEND.
If array_expr is NULL, the function returns NULL.