Makes mutations to objects in array if the objects id is the same as the new array.