The theoretical limits would be “as much RAM as your system can spare to hold it in memory”, which practically means, on modern hardware you probably don’t need to worry about it very much (text is extremely compact ).
The only concern I’d have is if the regular expression engine has a maximum length of the regexp pattern, for when an @array gets expanded out in a pattern match to include every single word from your array. A quick Google doesn’t come up with much in the way of results. Try stress testing it and find out.