What is the go-around pattern and procedure for Heathrow?
Needing to return shortly after taking off is not very common, and as such there is no specific established procedure or route to be followed. The pilot will inform air traffic control of their intentions, and ATC will route the flight back for an approach. Depending on the situation, the flight might require priority, in which case other approaching flights will get bumped back in the sequence.

Transponder codes are used to identify flights on ATC radar. Simply speaking, one specific flight will have one specific transponder code during the whole flight - it is not changed because the flights needs to do something unexpected. Transponders are not used to transmit intentions (although there are a few special codes that can be used in case normal means of communication are unavailable).

For a flight needing to return to Heathrow, the return path will be similar to that of any other aircraft approaching the airport.