Added unittest to reproduce issue in #1830
Corrected correct patch and added test for RemoveAt in array.
Changed patch generated when inserting or adding an item to arrays to add instead of replace.
Added unittest for replacing an item in an array.
Merge branch 'issue/1830' into develop