This is fundamentally the same as a substring search. They are both about finding subsequences inside a random-access larger sequence. And from your description, it sounds like your array is an array of chars, which is exactly what a string is.
The algorithm you describe in your note is pretty good and easy to code correctly. If it's not fast enough, look at KMP.