Implemented smart array diffing that can handle both contiguous as well ...

...as sparse arrays