ArrayMap removeOrReplace + tests