select array_agg(unnest) as distinct from (select distinct(*) from unnest( [3,9,1,10,3,7,6,5,2,7,4,7,4,2,2,2,2,8,2,10,4,9,2,4,9,3,4,3,4,7] ));