write stream that encodes arrays or objects as properly escaped CSVs