I don't think that functionality belongs to array helpers. Selections are essentially like arrays. You can flatten arbitrary data by creating a selection around an array (selection.create(array)) and calling flatten on it.