Almost all the attack spells in the PHB specific the type of target as either a creature, an object, or a point in space (as per Target section on PHB pg 204).
Scorching Ray just says
You create three rays of fire and hurl them at targets within range
But it doesn't specify what types of targets (creature, object, point in space). Should I interpret that to mean all three are then valid? I couldn't find anything in the Errata or Sage Advice Compendium on this specifically.