The formula here is (as in Line #1):
- Scale steps 7-8-9-7, 5-6-7-9 from the Major Scale (F Maj) from which the iii chord (A-7) is derived.
- Scale steps 3-4-5-3, 1-2-3-4 from the Melodic Minor (Eb Mel. Min) scale from which the VI chord (D7alt; an altered dominant 7th chord) and it's altered dominant scale is derived (Altered Scale = 7th Mode of Melodic Minor).
- Scale steps 3-4-5-3, 2-3-4-5 from the Major Scale (F Maj) from which the ii chord (G-7) is derived.
- Scale steps 1-2-3-1, 6-7-8-9 from the Melodic Minor (C# Mel. Min) scale from which the V7 chord (C7alt; an altered dominant 7th chord) and it's altered dominant scale is derived (Altered Scale - 7th Mode of Melodic Minor).
- Scale steps 7-8-9-7, and resting on the 6th scale step (D) of the Major scale (F Maj) from which the I (F Maj 6 or 7) chord is derived.
iii (FMaj.) VI (Eb MM) ii (F Maj.) V (C# MM) I (F Maj).
A-7 / D7alt / G-7 / C7alt / F
This is a perfect example of how Major, and it's "Evil Twin", Melodic Minor, can work together "in harmony", so to speak.