Added flatten functions

These functions will take an array and flatten into a single object.