Add arrayToCsv function.