Controller even on PC has this automatically built in. Or at least that's how mine works. If I target either a mob or player and perform an action it it is automatically set as the focus target I can then freely target other thing with the dpad and it will always go back to the focus target after I perform an action on whatever I subtargeted