What else could generate that high voltage.
It sounds simple to say the inductor "generates" the voltage and of course it does, but I deliberately referred to an "impulse".
The impulse is of course generated after the transistor switch turns off,
No, it is not generated after the transistor switch turns off, it is generated as the switch turns off. The inductor is in the short term, a constant-current source. Unless otherwise constrained, it will produce whatever voltage is required to keep that current flowing. So you have a circuit consisting of a switch and a constant current source in an "open-collector" arrangement. As the switch opens, the voltage rises. It makes no difference whether it is "open-collector" or "totem pole" driving, the switch is the source of the impulse and the critical concept is that - it radiates from there.
but kickback current flows through the inductor.
Here is the point of the common confused thinking. There is no such thing as "kickback current"!
The inductor has a current flowing through it. When the switch opens, the current in the inductor and the wires that connect the inductor to the rest of the circuit instantaneously stays the same. That is the whole point of an inductor - to resist any change in current.
OK, so what does change? Where is there a current impulse?
Well, the diode of course! Before the switch off, a current was flowing through the (power supply and) the switch (transistor). After the switch off, the same current is now flowing through the diode.
So what current has changed? Where is there a current impulse?
It is in the switch circuit, including the power supply itself, and the diode. Current in the switch goes (suddenly) down, current in the diode goes (suddenly) up by the exact same amount. Current in the inductor and the wires that connect the inductor to the rest of the circuit instantaneously stays exactly the same. Then of course, the current in the inductor (and diode) smoothly decays - not as much of an impulse by any means. So the wiring to the inductor does not generate an impulse (or a sudden change in magnetic field) between the inductor and the diode.
The shortest current path is when the diode is connected directly to the inductor.
Following from the above, if however you connect the diode directly across the inductor, the actual current impulse occurs in the wires that run beteen this and the switch, and it is this part therefore that radiates interference. Not only that, but this also involves the wiring to the power supply itself, so any other devices that connect along this path will also be subject to the impulse.
Any wire in between will act as an aerial and could transmit the spike to other circuits.
Yes, the wires between the diode and the switch, not the wires between the diode and the inductor!
What about the voltage "spike"? Well, that appears on the switched line all the way between the switch and the inductor, including the diode terminal irrespective of where the diode is located. It clearly is important that the two wires to any part of the circuit be bundled together as a pair, to minimise capacitive (electrostatic) radiation but much more importantly, to avoid electromagnetic radiation from "loops" in the wiring.
If the inductor carries a large current
Not strictly a factor
placing a diode at the switch and at the inductor is a wise precaution, as the stray inductance / characteristic impedance of the cable may generate large voltages anyway.
No, putting a second diode at the inductor is again, irrelevant!
In fact, inductance in the cable will add to the voltage at the switch, as the switching impulse travels from the switch to the inductor, so the diode placed there will be first to conduct, and the diode at the inductor will not be needed as it is simply ineffectual!
In summary, note that the transfer of current is from the power supply and switch, to the diode. To properly suppress the impulse, the triangle of three components which are involved must be located as closely as possible with short wires between: the switching device, itself the diode and the local bypass capacitor across the power supply. The latter is needed to prevent the current impulse travelling back along the wires to the power supply itself