ArraySerializer Updated to support generics