The setup and example can be found here: gitlab.com/pecktd/id_based_blend_shape_bif
It uses a multi (array) attribute as input so users can define the target vertex IDs for each base mesh vertex.
In script.py there is a function get_target_order to help users get an array of target vertex IDs that share the same position with the base mesh vertex IDs.
I've been experimenting to create a blend shape node that allows arbitrary target vertex IDs. I've done it with Maya Python API and found the speed is similar to using wrap / blend shape method.
Big thanks to this excellent tutorial from Marco D'Ambros.