Super simple, actually. Run a power line from the battery (so the hazards work with the ignition off), to a fuse, to a switch, through an electronic flasher relay, then split the wire into 4 and splice it in to each hot wire of the blinkers.
When I rebuilt my GL1200 Standard, the new left controls had a hazard switch. Interstates have them, Standards don't. I wired it up for fun, because why have a switch if it doesn't work?