I recently came up with this (poor but works) idea
[{"id":"d1a4329.d13a1d","type":"rpi-gpio out","z":"1d6ca75e.4c2489","name":"","pin":"8","set":"","level":"0","freq":"","out":"out","x":790,"y":160,"wires":[]},{"id":"4391f16d.244f1","type":"function","z":"1d6ca75e.4c2489","name":"Switch to Pin","func":"node.status({fill:\"green\", shape:\"ring\", text:\"start\"});\nvar pinArray = [];\nvar loop;\nfor (loop =1;loop < msg.pin;loop++) {\n pinArray.push(null);\n}\nnode.status({fill:\"red\", shape:\"ring\", text:[msg.pin,msg.payload]});\npinArray.push(msg);\nnode.send(pinArray);\n","outputs":40,"noerr":0,"x":470,"y":320,"wires":[[],[],["8f1bf80c.e0a4c8"],[],["d4b3eb1a.6a7148"],[],["f2d5c497.a96748"],["d1a4329.d13a1d"],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]},{"id":"52d1218.b23d1e","type":"inject","z":"1d6ca75e.4c2489","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":200,"wires":[["c4b76c47.7eec5"]]},{"id":"8f1bf80c.e0a4c8","type":"rpi-gpio out","z":"1d6ca75e.4c2489","name":"","pin":"3","set":"","level":"0","freq":"","out":"out","x":650,"y":20,"wires":[]},{"id":"d4b3eb1a.6a7148","type":"rpi-gpio out","z":"1d6ca75e.4c2489","name":"","pin":"5","set":"","level":"0","freq":"","out":"out","x":650,"y":80,"wires":[]},{"id":"f2d5c497.a96748","type":"rpi-gpio out","z":"1d6ca75e.4c2489","name":"","pin":"7","set":"","level":"0","freq":"","out":"out","x":650,"y":140,"wires":[]},{"id":"c4b76c47.7eec5","type":"function","z":"1d6ca75e.4c2489","name":"Write code here","func":"msg.pin = 8;\nmsg.payload = 1;\nreturn msg;","outputs":1,"noerr":0,"x":240,"y":320,"wires":[["4391f16d.244f1"]]},{"id":"eb59086b.b605d8","type":"function","z":"1d6ca75e.4c2489","name":"Write more code here","func":"msg.pin = 8;\nmsg.payload = 0;\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":380,"wires":[["4391f16d.244f1"]]},{"id":"959ff2f1.8c54","type":"inject","z":"1d6ca75e.4c2489","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":440,"wires":[["eb59086b.b605d8"]]}]
So in a function node feeding the switch you can just specify what pin you want using msg.pin
To control two pins in same function you can do this