Since this loophole is now closed as of 25.0 you probably want to use Gameplay Tags instead.
For now using tags is probably the best way to programmatically gather one or more devices.
We are discussing this internally at Epic and more related mechanisms will come in the future.