Using templates in a select selector script field

Nothing built in… there has been a proposal for multiselect open for a while, but AFAIK it’s still in the discussion phase.

You can use a trigger-based template sensor to store a history of selections.

See also: https://community.home-assistant.io/t/trigger-based-template-sensor-to-store-global-variables/735474 for a more expansive option using custom events.