Could I put a coil-on-plug (direct ignition) system in, let's say, a 1968 Ford Mustang GT? How much would I have to change? Could I add this setup to any gasoline engine?
You CAN. The question is how much time and effort you want to invest.
In your mustang, you have either points, or an electronic pickup (Hall Effect Ignition or HEI) that utilizes a single coil powering a distributor which distributes power to each of the spark plugs.
For Coil on Plug, you would:
a coil for each cylinder
Something to drive the coils (an ECU)
sensors for the ECU to determine crank/cam position and engine vacuum
something the sensor can read - likely a crank pulley or harmonic balancer
wiring harness to go between the ECU, sensors, and coils.
Some way to program it. Advance / RPM, Advance / Vacuum
This would not be a simple swap. HEI ignitions are very common and do a good job. Unless you are going for a full fuel injection conversion, I think it would be best to stick with a HEI.
I found one conversion kit on summit racing, but its for a honda B series.
You might be able to do such a setup with something like a arduino. You have 2 inputs (crank and map sensor) and 8 outputs (coils). Write up a little program that can determine TDC for each cylinder based on the number of cylinders and the pulse width of the crank sensor. From there you can add advance and add conditions for more/less advance.
The biggest conceptual difference between a conventional coil-distributor-spark-plug ignition system and a system like coil-on-plug is the management of the spark and spark timing. A coil-on-plug system allows an Engine Control Unit (ECU) to manage the spark with low-voltage signals controlling the individual coils. In your hypothetical '68 Mustang there is no ECU (unless you add one), so you would need find another method to initiate the spark and control advance. It might be possible to do this using the distributor either with switches or with a sensor and electronic switching.
It seems doable and like it might be a fun project. But engines and engine controls have come a long way since the '60s and you may find that there are a number of complicating factors…
Every petrol/gasoline engine have a coil. It only might be located in different places and working on different voltages. Some have 1 single coil for all cylinders, some have individual coils - 1 for each plug, all in one case; some have individual, fitted straight on a spark plug, no leads.. So yes, you can fit. But why? What's on your mind..?