Excellent Idea! (MAYBE there's a loophole)
First of all, I'm impressed by this strategy! It's a great idea, and turns the tables on the Beholder extremely well. You might have some trouble targeting the Beholder from within the cloud yourself, but characters normally know where other creatures are during combat (the fact that the Beholder hovers may complicate this, but probably not unless the Beholder takes the Hide action).
There is a small potential loophole I noticed, but it's not ironclad (more open to interpretation).
Legendary Action & Lair Actions
The Beholder can use its eye rays with its Action during its turn, but must choose targets it can see. However, it can also use its eye rays in two other ways: one is with a Legendary action at the end of another creature's turn. This legendary action is described as follows:
Eye Ray. The beholder uses one random eye ray.
It can also use lair actions, one of which is the following (MM, p. 27, bold added):
Walls within 120 feet of the beholder sprout grasping appendages until initiative count 20 on the round after next. Each creature of the beholder's choice that starts its turn within 10 feet of such a wall must succeed on a DC 15 Dexterity saving throw or be grappled.
Note that neither of these descriptions requires the Beholder to see its chosen targets.
It's likely that the definition of the eye rays given in the Actions section of its description is meant to apply to the other (Legendary) rays as well. But this is ambiguously worded, and open to interpretation. Clearly, some parts of the description of the eye rays must apply (or else there would be no limit to the range of these Eye Rays, for example): exactly how much applies, though, is ultimately up to the DM.
Even if its lair and Legendary actions do not require sight, note that your strategy would pretty much halve the amount of opportunities that the Beholder has to target creatures directly (as opposed to lifting a heavy object above a character while they are in the Antimagic Cone, and dropping it). This makes this strategy an excellent idea in any case.
Yes, but there are ways around it
You are correct in that you don't get extra saves to shake off the charmed condition. The Charm Ray is indeed a powerful means for the beholder to prevent your character from attacking it, and without intervention this effect will last for the whole fight.
As discussed in this question, while you can't attack the beholder directly or directly target it with any harmful effects, you can still support your party. To be specific, the charmed condition has the following two effects:
A charmed creature can't attack the charmer or target the charmer with harmful abilities or magical effects.
The charmer has advantage on any ability check to interact socially with the creature.
Nothing in the charmed condition prevents you from assisting your allies, be it healing them (either with spells or potions) or providing cover or doing any other task which aids your allies who happen to be fighting the beholder. You are only prevented from targeting the beholder with harmful effects (this probably includes the Help action to help your allies hit the beholder).
There is also nothing stopping you from attempting to remove the charmed condition. The spells calm emotions (2nd level), greater restoration (5th level), mind blank (8th level) and power word heal (9th level) can be used to remove or suppress the charmed condition caused by the beholder's Charm Ray mid-combat. While the latter two are likely beyond your reach, the former two should be available for a party of appropriate level to fight a beholder. You can cast these spells on yourself if you have them available, or get a friend to cast them for you, thus ending the charmed condition.
As indicated by CTWind, there exists another way to suppress the effects of the Charm Ray, and that is by using the beholder's own Antimagic Cone (or another antimagic field you happen to have handy, but we'll assume you don't have one of those). The Eye Rays are explicitly magical, and the duration of the Charm Ray's effect is not Instantaneous. Within the antimagic field...
Any active spell or other magical effect on a creature or an object in the sphere is suppressed while the creature or object is in it.
This would include the effects of the Charm Ray. The beholder's Antimagic Cone even calls out the Eye Rays as being affected by it. Thus, if you stand within the beholder's Antimagic Cone, the charmed condition is suppressed and you can attack normally.
This is not a fool-proof plan, as the beholder can move or deactivate its Antimagic Cone at the start of its turns. But in doing so you force the beholder to choose between using its Antimagic Cone to suppress your party's casters and magic items or leaving you charmed.
Best Answer
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.
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.
Then, it chooses the target.
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.