This method of composition of melodies has as sub-methods, the purely chromatic (tail) method and the arpeggio-tail method to create melodies.
Besides the re-numbering of the notes based on the underlying chord, we also re-number them as 0-1 notes (1 belongs to the chord, 0 does not belong) which is an even simpler numbering to compose the fitting to the chord melody.
Of course the topology and the pitch waving of the melody is not derived from the chord progression and it is a more or less independent and important feature of the musical meaning of the melody.
In order to compose-improvise the melody we need to determine the next factors
1) The melody motive is over one, two or three chords?. Determine the melody motif (theme) which is 85% rhythm rather than pitch waving.
2) Determine the rule of arpeggio (3rds,4ths,5th, 6th ) and tail (steps by 2nd) pattern. E.g. The 3-notes chords that are inside the diatonic scale with arpeggio pattern, and the chromatic 4-notes chord with the blue notes outside the scale with tail step-wise by 2nds melodic theme.
3) We determine the pitch waving topology (dolphin word) across the chords. in other words up, down , stationary . Cycles and balanced patterns are preferred. This factor is the closest to the ove all feeling ofthe melody together wit the chord-progression factor.
4) The rest of the melody is modulation over the chords (or chords pairs , or triads which is the melodic motif). Of course we do not follows strict modulation over the chords but we make asymmetric to signify start-end of melodic parts. This part is the repetition and variation part of the melody composition and includes the repetition and variation pattern of the chords in the chord progression..
The out-of-chord passing accented notes better be dealt as notes of extension of the chords. E.g. 2nds of the chord that would be it suspended chord.
Here a relevant video
https://www.youtube.com/watch?v=jA7gdz56LtY&ab_channel=DavidBruceComposer
The anticipation passing notes resolving passing notes etc are minor techniques.
https://www.youtube.com/watch?v=9LUQUk0hd10&t=704s&ab_channel=GuyMichelmore