The diversion airports are chosen specifically for each stage of the flight, so a flight doesn't ever need to return to where it came from.
Oceanic flights are planned so that at every point along the route, the aircraft can lose an engine or cabin pressure and still reach a pre-approved diversion airport with enough fuel, with the flight plan marking the points where turning back versus continuing becomes the faster option. If a diversion is needed mid-ocean, the crew offsets from their assigned track and altitude to stay clear of other traffic, then heads to the nearest suitable airport, such as Gander, Keflavik or Shannon over the Atlantic, or Anchorage, Cold Bay or Midway over the Pacific.