Can I use a capacitor to power an Arduino for 5 minutes after the power has been cut?
Run the microcontroller off the same power that is available to the headlights.  The extra current to run the micro is miniscule compared to that of the headlights.

Just make sure the micro goes into proper low power sleep mode when done with the headlights.  I don't know whether the arduino hardware is designed to allow for low sleep current or not, but plenty of micros are.  With competent hardware around them, this is trivial.  It is easy to get well below the self-discharge current of the car battery.