convert array to csv