array.reduce(), flatten out an array of arrays