Assuming that your note array in ordered largest first, I would simply divide the value by each note value in turn: the quotent is the number of those notes to issue, the remainder gets passed down to the next note denomination.
So if your value is 123 and your notes are 10, 5, and 1:
123 / 10: Q == 12, R == 3 (12 x 10 notes)
3 / 5: Q == 0, R == 3 (no 5 notes)
3 / 1: Q == 3, R == 0 (3 x 1 notes)
Only one loop is required.