Convert nested array-like and/or iterable object to a flat array.