replace #flatten with Array()
Merge pull request #8693 from goshakkk/flatten

Replace #flatten with Array()