This is called
voice allocation; in general, there is no fixed association between notes and voices, and whenever a note must be played, you choose any free voice.
And when you run out of available voices, you must do
voice stealing, for which there are many algorithms.