postgreSQL
select array_field from test where array_field[(select generate_series(1, array_upper(array_field, 1)) as maxIndex from test limit1)] like '%xxx'
select array_field from test where array_field[(select generate_series(1, array_upper(array_field, 1)) as maxIndex from test limit1)] like '%xxx'