added support for array serialization at root and class member level