Added serialization for array of primitives.