The difference between matches() and find() are how they treat the regex. matches() has to match the entire string, where find() just matches some part of the string.
The code you have seems to ensure that the mainString contains all the patterns in the groupArray, in any order or with any type of overlaping.
So if groupArray = { "a", ".b." } and the main string were "abc" it would return true, even though the substrings matching "a" and ".b." overlap. But mainArray = "bbb" would not be true since it does not match all of the groupArray expressions.
If that's what you are trying to do, then I don't know a way to write that general regex given all the groupArray elements.
If groupArray is not going to contain regex, but is just substrings then
you should probably skip the regex thing and stick with String.indexOf() != -1. Probably faster (not sure about this) but easier to read. It is also less prone to failure if someone were to stick regex special symbols in the groupArray.