A defined function to write commen format array to disc