I was thinking of something as simple as this:
void setLeds(char *leds, byte value) {
while (*leds) {
digitalWrite(led[*leds++ - '0'], value);
}
}
setLeds("1457", onoff);
I think the feedback that there are bigger patterns you can factor in to common routines is probably more important, though.
-br