For spells like Magic Missile and Scorching Ray that involve multiple ranged attacks, when do you pick targets for each ray/missle?
Do you pick them all up front and then roll attack/damage? Or do you pick one, roll attack/damage, and repeat?
The only thing the PHB has on the matter is on page 193-194;
Making an Attack
Whether you’re striking with a melee weapon, firing a weapon at range, or making an attack roll as part of a spell, an attack has a simple structure.
Choose a target. Pick a target within your attack’s range: a creature, an object, or a location.
Determine modifiers. The DM determines whether the target has cover and whether you have advantage or disadvantage against the target. In addition, spells, special abilities, and other effects can apply penalties or bonuses to your attack roll.
Resolve the attack. You make the attack roll. On a hit, you roll damage, unless the particular attack has rules that specify otherwise. Some attacks cause special effects in addition to or instead of damage.If there’s ever any question whether something you’re doing counts as an attack, the rule is simple: if you’re making an attack roll, you’re making an attack.
Since it doesn't say anything about multiple targets, you could technically read it as you choose and roll attack/damage before you choose another one.
However, I'd say it's mostly up to you and the DM to choose, if it's faster or situationally beneficial to target and roll for one creature before targeting another or to choose all targets at once than go with whatever works.
On a side note though, Magic Missile specifically states
The darts all strike simultaneously
so I'd say you have to choose all targets first, at least for that.
Multi-beam spell like E-Blast: Choose all targets at once? Or can you hit with one, see result, choose next target, etc?
The intent is that you can choose an attack spell's targets one after another, unless the spell says otherwise.
(Mike Mearls suggests otherwise here, but only Crawford's rulings are official.)
This is true of most multi-projectile/ray/beam spells, such as eldritch blast or scorching ray. You fire them one at a time, and can pick the target for each one (so you don't end up wasting a bunch of scorching ray beams on a creature that's already dead from the first hit).
Magic missile is a notable exception, because it states:
The darts all strike simultaneously, and you can direct them to hit one creature or several.
So for magic missile in particular, you pick the target of every dart of force at the time you cast the spell, and they all resolve at once. (This is also why you only roll the damage for magic missile once, by RAW.)
With magic missile, it's a single damage roll per target, so you'd pick them all at once, with scorching ray, it's one after another, so I'd say you could resolve each before you chose the target for the next.
There's no real RAW answer here, so you're up the whims of your DM, they may make you pick all of the targets simultaneously or be able to choose after resolving each attack. It makes more sense for powers like Magic Missile to assign the damage first (again, since each target gets a single damage roll) and for powers like Scorching Ray and Eldritch Blast to possibly be able to choose targets as you resolve the attacks.