When I GM, I like to have my enemies pick targets semi-randomly. I try to assess what would be realistic for them to do based on the battlefield situation and threat level, as well as the type of enemy. This is relatively simple when there are few enemies in the battle. I pick out the enemies they are likely to target based on proximity, reachability, and threat with some weighting if compelling to do so, and then roll. But when there are dozens of enemies with enough reach to have a lot of targets, this process is too slow, I came up with a different way recently:
Suppose I have a dozen archer on cliffs above the party. Their viable target options are the entire party, but I don’t want to roll a d8 for each of them to pick a target, much less consider individual leanings for each of them. Instead, I pick their most favorite target as a group and determine how many attack it with a single die roll that averages high quantity. I repeat this process with the remaining attackers, going down the list of probably targets.
In one recent battle like this, a massive undead wolf was the favorite of maybe ten possible targets, so I rolled 1d12 to determine how many fired on it. This averaged over half, but I rolled a 1. This meant there were 11 going on to the next two most likely. I considered them equally likely, so I rolled a d6 each, rolling a 1 for the first and a 6 for the other. With four remaining, I rolled a d4 for the next few most likely until all the shooters were taken.
I use this example because the wolf was a clear favorite to me, but the dice surprised me, and as a result, Rovert got shot with 6 arrows when it should have been maybe 3. It was a fun twist to the battle and a big part of why he decided to finally retreat. I have been using it a lot since then to determine these types of situations, and I’m liking it a lot. I recommend trying it!