If you put 2AA into a LD40 you will get no light, or just a dim glow. Buck drivers in that type of light prefer at least 4V to work properly.
The Fenix TK40 and TK45 are designed for 4 cell operation. The battery holder can take 8 batteries in 4 series 2 parallel to allow use of low amperage capacity (alkaline and some NiMH). If you use Eneloops you can use just 4.
Check the voltage range of the flashlight head.
The Quark AA an 2AA both use a 0.9V to 4.2V head. So if you have a Quark 2AA you can buy a 1AA body.
The Quark 123² uses a 3V to 9V head. The Quark 123 uses a 0.9V to 4.2V head. I do not recommend using a Quark 123 body on the Quark 123² head. While in theory a 3V CR123 or 3.6V RCR 123 is within the 3V to 9V range buck circuits operate best at 4+V.
A number of lights come with extension tubes. You can use more batteries with the tubes or less batteries without them. Just remember the lights will be a lot dimmer without the extensions. (Some 1AA/2AA lights can take 1*14500 which brings the brightness back)
The top light in the picture below is an example.
I shrunk the length a little more by switching the head to a body without a click switch.