Some spells (Eldritch Blast, Scorching Ray) involve making multiple attacks, in that they require multiple attack rolls. Under the movement section of the PHB, the “Moving Between Attacks” reads (PHB 190):
If you take an action that includes more than one weapon attack, you can break up your movement even further by moving between those attacks. For example, a fighter who can make two attacks with the Extra Attack feature and who has a speed of 25 feet could move 10 feet, make an attack, move 15 feet, and then attack again.
However, Eldritch Blast and Scorching Ray are not weapon attacks, so unlike a Twinned Booming Blade, they would not satisfy the wording of that particular rule.
The introduction to the “Movement and Position” section, however, reads (PHB, 190):
On your turn, you can move a distance up to your speed. You can use as much or as little of your speed as you like on your turn, following the rules here.
This provides the general notion of movement and does not give any restrictions on timing except that it must be on your turn. “Following the rules here” only explicitly applies to the amount of speed used.
“On your turn, you can move a distance up to your speed.” could be considered parallel to the description of bonus actions (PHB, 189) “You choose when to take a bonus action during your turn, unless the bonus action’s timing is specified” in which case, barring a more specific restriction, movement can be used at any time on your turn.
Is movement between a spell’s attacks not allowed because it was not expressly permitted under “Breaking Up Your Move”? Or is it allowed because movement was not said to be restricted while taking an action?
A related question of mine is similar, but asks whether a bonus action can be taken between the attacks of a spell.