"Each of a beholder's small eyes can produce a magical ray once per round as a free action. During a single round, a creature can aim only two eye rays (gauth) or three eye rays (beholder) at targets in any one 90-degree arc (up, forward, backward, left, right, or down). The remaining eyes must aim at targets in other arcs, or not at all. A beholder can tilt and pan its body each round to change which rays it can bring to bear in any given arc." (MM 25)
This is the main restriction. The beholder can use all ten of its eyes in one turn, but only if it has targets in various different arcs to choose from.
Suppose, for example, there are three PCs directly in front of it, and one on its left side. It can aim three rays at one of the targets in front, or divide the rays one each amongst the three in front (or however it chooses to divide them)... and the hapless sod by himself on the left will get hit by another three rays.
Also note that the Antimagic Cone is not compatible with other rays, and takes up the entire arc by itself.
"Eye Rays. The beholder shoots three of the following magical eye rays
at random (reroll duplicates), choosing one to three targets it can
see within 120 feet of it"
It's funny what they did with the beholder. In the 4e, it could choose the targets and eyes on its turn but not on each player's turn, when it would attack them with a random eye.
From what I understand, at random, and since it's not a recharge power, I'd say the beholder is trying to focus some of its enemies while there are always rays going around in the dungeon room. The beholder is dangerous because it can always attack its enemies from any angle, but sometimes, its death ray is on the back of its head (each eye has a different spell, not more than one) and it can't use it against the fighter on its left or against the sorcerer in front of it. It will use its closest eye in that particular split second during battle, which is represented by dice roll (remember the characters are always moving during combat, looking around, repositioning and all that). That's why it's so random. I'd choose the targets first, as normally is done when you make an attack roll, and then roll a d10 to know what eye the Beholder is using.
You have to agree with me that, if you choose the targets after you know what eyes to use, the logic behind the way the beholder behaves and the fact it attacks with random rays falls apart and, besides, if you get 3 death rays in a row and use it against the same target over and over, it doesn't really feel random at all.
Beholders were always kinda unpredictable and I think the way described above applies to that idea very well.
Break it down with how a turn works
If you wanna go word by word, purely rules-wise, then just remember how a turn works.
First, you declare what you're about to do.
- Beholder decides to use its eye-rays.
Then you see how your action works. In case of an attack action, you make the attack roll, in case of a spell, you choose the AoE or, in case of the beholder rays, you roll to check what kind of ray it has available in that turn.
- Beholder rolls its dice and it gets disintegrate, death ray and sleep ray.
Then, it chooses the target.
- It decides to use the three of them on the same wizard.
Honestly
I find it rough. It makes the beholder way more dangerous.
But it gets closer to the 4e version (when the beholder could always choose 2 rays on its turn). The beholder can always choose its targets anyways (3 each turn, plus the ones of its legendary actions), and on the top of that, it is able to choose always the same target to be disintegrated? That sounds like too much.
You could use both ways, really, by rolling the dice after choosing the targets to make the combat easier; then, if you think your players are more than capable of facing the beholder, roll the dice before choosing the targets.
Best Answer
The Monster Manual (p. 9) says:
Multiattack is its own action (i.e. it is not Attack, Dash, Disengage, Hide, or Use an Object). Neither is Eye Rays one of these actions. As such, neither can be used with the additional action provided by haste.
Both the beholder and the Benin (and any other monster) can only use the actions specified in the Haste spell. For every monster, the actions listed in their stat block are not those actions: they are their own actions. For the record, using a magic item is also its own action, so the beholder cannot use the basted action to activate a wand for example.
If a monster or PC wants to do something offensive with the Hasted action they must take the Attack action (one weapon attack only)- that means the specific thing they use must be a weapon attack, i.e. must have the words "weapon attack" in them.
Read strictly, you cannot make an unarmed attack or a shove or a grapple, however, I personally think that goes beyond the intent.