Return an array of new elements from Path.prototype.replace.

This makes it very easy to iterate over the new elements if you choose to
do so: path.replace(a, b, c).map(traverse).