You are certainly not the first to conceive of intelligence as pattern analysis. In fact, there is a book by Jeff Hawkins called "On Intelligence" which investigates this idea in depth. His idea is that the best candidate mechanism for intelligent brain function is predictive coding.
In the predictive coding framework, the job of the brain is not to continuously process all incoming information, but instead to continuously predict upcoming information: the brain is an inference machine. Predictive coding is a hierarchical process whereby a any stage in cognitive processing sends its prediction to a previous stage in processing via feedback connections. For example, if area V2 'expects' to see a square, it will send this information to area V1, which codes for line orientation. If the received input matches the expectation, the information is suppressed. The information now doesn't need to go any further than V1, because it has already been fully predicted, i.e. the brain already contains a representation of it. If, however, the input doesn't match the prediction, the mismatch, called prediction error, is transmitted further through the processing hierarchy.
Prediction error is considered the reason why surprising (invalidly predicted) stimuli lead to more neural activity than unsurprising (validly predicted) ones, for example in mismatch negativity paradigms.
The notion of expectation here is automatic, it is a function of each brain area and does not need to be conscious in the sense of us being aware that it's happening.
It is however important to note that this notion of intelligence is nothing like the notion of intelligence in psychology. In psychology, intelligence is a measure of individual differences between people. The predictive coding framework is, in contrast, posited as a general feature of the neocortex.