I've written patches with clones where each clone needed to know:
 how many siblings it had
 data from its preceding and following clone
 whether the preceding or following clone exists
To do , I've had each clone send its instance number ($1) to a known global destination. Since it appears that clones are created in ascending order, this works as long as you adjust for the start index (again, something that clones don't automatically just know). I haven't found anything that says this creation order is specified, nor have I found a way to set the number of clones from some external value, so I regard my solution to be a hack. Can I count on this order, or should I use [max] on every incoming instance number?
For , I've used [value] with identifiers that include each clone's instance number. It's a small PITA when accessing other sibling's values because you can't do arithmetic on the instance number in the preprocessor; you have to make it explicit, e.g.
The last is similar to , except that I just initialize a "clone$1exists" value to 1. It appears that if you ask PD for a value that doesn't exist, it returns 0.
Are there better ways to do these things that don't require manual housekeeping or rely on undocumented features?