When should I use the global Reynolds number and when the local Reynolds number? I know that for the wing, the Reynolds number is based on the MAC. This makes sense to me, as the boundary layer develops along the length of the wing.

However, what kind of Reynolds number needs to be used if there is a flap behind the main wing and there is flow pattern like this:



Source

Some of the air particles  will have streamed along the wing before hitting the flap, so I would say then you should use the wing Reynolds number.

But, on the flap, also a new boundary layer will start. Particles coming through the gap will only see the flap, and will thus experience a flow with a lower Reynolds number (based on the flap length).

If I'm talking about flow phenomena on the flap, should I be using the global Reynolds number (based on the wing chord), or the local Reynolds number?
Definitely use the local Reynolds number on each of the flaps! The flap will only work properly if it is allowed to produce its own, fresh boundary layer. If instead it inherits the slow, thick boundary layer of the wing or flap ahead of it, the flow would soon separate and the flap would loose most of its effectiveness.

Note that a Reynolds number is always a local phenomenon. At 2 m from the leading edge, the Reynolds number is twice as large as at 1 m. Only when you compare total coefficients for the whole airfoil would the Reynolds number at the trailing edge be used.

If the distance between your bodies is more than a few centimeters, the boundary layers will not interact, so again the local length should be used for the Reynolds number reference length.