Currently, script modules use the script_module_data_{$module_id} filter to pass data to script modules on the frontend. However, there is no analogous filter available for classic scripts.
Proposal:
Introduce a similar filter for classic scripts, for example script_data_{$script_handle}.
This would allow developers to hook into the process of localizing data for classic scripts in a way that mirrors the modern script_module_data_{$module_id} filter.