How to create an array from column values?