Renamed flatten to flattenedArray.