Refactor adapters to implement support for array serialization

Refactor adapters to implement support for array serialization