This code:
RED.view.select({ nodes: RED.search.search("flow:current type:switch").map(d => d.node) })
This flow:
[{"id":"24831dd56ceff93d","type":"switch","z":"2f797dc464a1fcab","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":2505,"y":2390,"wires":[[]]},{"id":"bf683b8a89ad8f77","type":"switch","z":"2f797dc464a1fcab","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":2405,"y":2565,"wires":[[]]},{"id":"638a45148d984d93","type":"switch","z":"2f797dc464a1fcab","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":2346,"y":2457,"wires":[[]]},{"id":"1f760e69a25e629c","type":"change","z":"2f797dc464a1fcab","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":2520,"y":2464,"wires":[[]]},{"id":"ba6ed35db0f71b43","type":"function","z":"2f797dc464a1fcab","name":"function 33","func":"\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":2341,"y":2354,"wires":[[]]},{"id":"bddace064957cb30","type":"template","z":"2f797dc464a1fcab","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This is the payload: {{payload}} !","output":"str","x":2439,"y":2651,"wires":[[]]},{"id":"228adad47821c872","type":"exec","z":"2f797dc464a1fcab","command":"","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":2586,"y":2544,"wires":[[],[],[]]}]
This gif:

First nothing is selected, then all switch nodes are selected and then I can move/delete/duplicate them as desired.
And as I explained, I have very specific use-cases why I need to do this - very occasionally - and hence my inquire whether anyone else would need this.