Make .flatten() a utility function

Also removed the top-level object exploring to make the wrapper more
straightforward. The wrapper now simply calls .flatten() for all array
items.
Add .merge() array support