Handle empty array in the subscript operator

Addresses #2133 
add a test for `ARRAY[NULL][1]` which should evaluate to `null`