I don't mind cleaning this up myself but the second argument to `inreplace` can take an array.