fix arrays of objects encoding with numeric index