add tests for array serialization