this is how i order notes in a table:
when a new note is input, read through the table until you reach either a 0, or a number higher than the new note. if you reach a zero, then put the new note in place of the zero. if you reach a higher note, then shift every remaining note 1 step forward in the table, and then put the new note in its place.
if a note is turned off, then read through the table until you find that note, and then move every remaining note 1 step back in the table. fill the end of the table with a zero.
usually you don't want more than about 10 notes for an arpeggiator, so the table reading will occur almost instantaniously.
also, for an arpeggiator, you really want to have an 'octave' function to really get some movement happening you can do it very simply by triggering a counter that goes up in 12's. so for just one octave, the counter always stays at zero, for two octaves it goes 0,12,0,12,..for 3 octaves 0,12,24,0,12,24..etc
a slider for the gate time is also good. make a slider from 0.001->1 where 1 keeps the note on for an entire beat, and 0.001 turns the note off almost immediately.
then, you want to have a radio controlling the speed of the arpeggiator...1/16 beats, 1/8 beats, 1/4 beats...etc
so that will give you a basic arp, which will sound ok in a 70's disco kind of way. make it into an abstraction.
the key to making it sound REALLY good is to use another arp or simple sequencer to modulate the settings of your first one.
if the speed is always set to 1/8 notes it's going to sound really rigid, so make another simple sequencer to rhythmically change the speed. wha-lah! now instead of metronomically boring 16th notes, you get 1/4 notes, 1/8th notes, and trills of 1/32 notes too.
and you can do the same thing to modulate the octave setting.
that's as far as i've got, and it sounds great. but i just had one other idea while typing this:
use another arpeggiator to send notes into the original arp.
also, arps are good to use in place of lfo's.
in conclusion. arps are awesome. you can build them with the most basic pd objects, and they sound wicked.