[Note: "Settlement" in this document means "Town or Castle"]
How about this? A variation of this has been used in later HOMM games, but this feature set is slightly expanded too from other ones I've seen in HOMM games.
Different players could be customized to be restricted to certain alignments in the Options screen.
There would be 9 Types of Towns/Castles (6 Fixed Types and 3 Random Types):
6 Fixed Types:
Ones that are set to one alignment, as already exist now, so Knight, Barbarian, Sorceress, Wizard, Warlock, Necromancer types;
Random Type 1 (as what currently exists):
Completely Random Town/Castle Objects that always match starting alignment for non neutral (taking into account the allowed alignments for that player), if neutral would always randomly choose out of all six alignments with equal chance of each. Alignment for Random Type 1 not customizable but all the other properties of a settlement customizable;
Random Type 2 (New Type):
Customizable Random Town/Castle Objects that can be set to have a minimum of 2 of the alignments selected and maximum of 6 possible alignments selected, and these are Always Rolled Randomly Despite Starting Alignment. All the alignments that are allowed for that particular settlement would be equally likely to appear, and these can be completely different to allowed alignments for a particular player. Neutral settlements of this type would randomly pick one of the allowed alignment types for that individual settlement with equal chance of each;
Random Type 3 (New Type):
"Same Alignment as Town/Castle <here>" Town/Castle objects. These would always refer to one of the other two Random Types (a particular settlement at </here>
Random guardians for neutral settlements of any type would be generated as normal matching that settlement's alignment (if there is any room in the garrison for new creatures to be generated), and of course by default starting player settlements would not contain any garrison unless it is customized.
Also, any hero that is customised as "Random" that starts Inside a Town/Castle of any Type (One of the 6 Fixed or 3 Random Types of Town Castle) would always be the same alignment as that individual Town/Castle's alignment in that game, unless the game runs out of heroes of that type, then it would be random out of all heroes not already selected.