Refactor adapters to implement support for array serialization