Update arrays without mutating the original