Refactor adapters to implement support for array serialization

Refactor adapters to implement support for array serialization
root semantics must be moved outside of the base adapter since the adapters can handle it in different ways.

For example in JSON-API document top-level may also have other members (meta, links, linked)