For alliances, they must pick one at a time.
For loyalty programs and shares, there don't seem to be any consistent rules. Particularly in Asia, if only one airline flies a specific route, codeshares with numerous airlines often make sense (they help the operating carrier sell more seats, and the give the partner carriers more reach).