Real proteins have a number of structures which are composed from sequences and which make up the larger functional proteins. In the extreme case if you have a good idea what the protein does and an unprecedented way to predict its folding you could probably guess most of the sequence having never seen it.
You can think of it as computer code. It's a terribly written language that does no static checking or error handling, and in which every conceivable hack is used. But since many proteins do similar things they also reuse the same substructure.
But yeah proteins have several levels of structure [1]. The "primary" structure is the sequence, but there's a "secondary" within this sequence that codes for sub-sequences which form helices or sheets, which in turn glob together in the tertiary structure.
So there's a rich "grammar" to them.