So first question is, how do I connect the arduino to the circuit to control the LEDs with the LED Driver and the second question, does this circuit work without problems? I don't want to damage any parts.
If I understand your response correctly I have to use 4 LEDs oder 2 LED Drivers for every line to light up every LED with 700mA.
But if Iam right, this should work too so every LED should get 350mA if I use two sets and if the led will light up on 350mA.
Yes your question is fully legitimate.
I need Arduino because I wanna create some programs, for example:
Program 1: The light is on
Program 2: The light will flash every second
Then you need 7 in parallel and indeed a resistor (or indeed better, a PTC) in order to divide the current nicely.
And you can put max 3 in series as it's a step down so you have to stay under the input voltage.
And as the quiescent is 1mA which is pretty high for battery powered I would add a (high side) transistor to switch the driver really off. But you can use the PWM pin to dim (or flash) it.
High power Cree LEDs like constant current. Temperature fluctuations are significant. You need significant heatsinking. I suggest you experiment a little with a single LED and see what kind of heat you'll be dealing with. If you buy the LEDs that are already mounted on PCB discs, 16 or 20mm, for example, they are easy to heatsink because the backing is electrically isolated and very thermally conductive.
You need to check out their data sheets and get to understand the data curves very well. And I can't remember the exact reason, but iirc you may be happier with XP-G2's instead of the XP-E2's.
And frankly, you will get much more useful information and help from people much more familiar with flashlight making and modding over at the candlepower forums. The Arduino part, imo, is extremely unnecessary, but even if you decide to go that route, you need a working flashlight first. Come back when you've gotten that far. I highly recommend using the knowledge over on the candlepower forums, folks here just don't hold a candle.