Make sql to SQL ARRAY builder