Generate unique match array for regex functions.

Reusing this state broke nested replacer functions in regexes.

I don't like the fixed constant of 100 subexpressions, cause that could be a sizable chunk that builds up fast.