Jenkins currently has two ways of restarting the controller: Restart now (currently running jobs are killed) and Safe Restart (Wait for all jobs to complete or pause but do not accept any new jobs).
We have very long-running jobs (Machine Learning) that cannot pause for sometimes 30-60 minutes. If we trigger a safe restart in that time, the queue is blocked for that whole time and everyone is waiting for a single job to enter a pausable state.
A solution that would solve this issue is a new restart option, that simply waits until no builds are running without disabling the queue. The downside is obviously that the jenkins admin would like to immediately know if the startup works and don't want to monitor their screen for 3 hours until a slot is found. For this, a notification could be sent via mail, notification, ... ("Jenkins restarts in 60 seconds").
There are alternative solutions but I wanted to put it out here for discussion.
I don't think this is something for core itself.
The closest thing is probably the lenient shutdown plugin, that allows to finish everything that is in the queue, so it doesn't block completely.
It also has an allow list where you can enter projects that will not be blocked. Though it lacks a restart mechanism, but that should not be too hard to implement.
If I understand you correctly you would be more interested in a blocklist.
The blocklist can also be achieved with a job using systemgroovy. It puts Jenkins in lenient shutdown mode, then it checks once a minute for new jobs in the queue, then it checks if this new job should be blocked (could be a parameter of the system groovy job). If not blocked, it will enter the queue id in the allowed queue ids of the lenient shutdown plugin. Once the job sees that none of the blocked jobs are running it can put Jenkins in shutdown mode, wait for jobs to finish and then restart.
Another thing is if you have pipeline jobs you can just restart your Jenkins, the pipelines will resume afterwards.