Improvied table serialization to serialize array part and non array part in a different way