Added unittest for replacing item in array.
Fixed implementation of replace in array.
Replace instead of Add when generating patch for a replace in an array.
Added unittest for testing adding subitems in arrays and generating patch to reproduce #2049
Fixed unittest to have correct expected value.
Correctly generate changes for arrays. Fixes #2049
Merge branch 'issue/2049' into develop