I understand that all zeros or all ones would be weak for any cipher.
This isn't actually true. For good cipher there are no weak keys.
And certain ciphers, e.g. DES, have a list of weak keys. But I assume that there would many 'patterns' that would be detected (if that is the correct term) as weak. For example, 0x0505 ...05, 0x1010...01 and 0x0A0A...0A. Or other patterns such as half the key being 0s and the other half being 1s or half the keys being 3s and the other half being Cs (i.e. the compliment of 3.
This isn't true for most algorithms.
More specifically you fall into thinking that number can either be random or not. Is 3 random? On a 1-10 scale? We humans easily assume that "1234" or "1111" isn't random. But what if it's just what came our of good RNG? Is RNG broken?
No, instead we are broken. We easily consider some things "too simple", while computers can just draw random number in range that is always random (if proper algorithm is used). It doesn't really matter if the number is 1, 5 or 283921. Algorithm design decides if numbers generated are good, not the number itself. Algorithm doesn't have to check for only 0bit keys, because chance that it generates this key is just as high as all other keys.
Now, why DES has "weak keys" then? Because those are keys that make algorithm perform poorly (encrypting again can undo effect for example). This shouldn't be case with good ciphers. We hope that Enc(K1,text) can only be undone with Dec(K1,text), not Dec(K2,text), nor Enc(K3,text) and especially not with Enc(K1,text) again!
A key must have a large number of patterns, so is there a way to calculate this number?
Yes, random key in 128-256bit range is good. Any attempt at excluding keys like only zeros just limit how random your algorithm is.
Are the patterns I mentioned above (and similar) weak keys?
No, DES weak keys come from how DES performs with those keys, not from how they look. If we found AES weak key of 0x28357129912581823923, this would be weak key because of how it works in algorithm, not because it looks non-random.
If we speak of "weak key" as in keys that aren't random enough, then it only comes down to how you generate those keys, not what those keys are! (Any key you get is not random then).