timing problem returning a pointer to an array

Although using static worked, I think I've come up with a simpler way of doing what I want to do. Instead of returning a pointer from a function, if I do things as I would have done in Pascal or PerfectScript (WordPerfect's scripting interpreter), I can pass a pointer to the array I want to fill as a parameter. Like so:

void setup (){
  Serial.begin (115200);
}
void loop () {
  SEND_JOYSTICK_MESSAGE ();
  delay (1000);
}
void SEND_JOYSTICK_MESSAGE (){
  byte Category = B01; // Roboteq SetCommand
  byte Name = 0; // _G, but will contain data for both channels
  byte Target = B001; // Roboteq target ID
  byte ID[4];
  CREATE_ID (Category, Name, Target, ID);
  Serial.println ("ID bytes:");
  Serial.print (ID[0]);
  Serial.print ("    ");
  Serial.print (ID[1]);
  Serial.print ("    ");
  Serial.print (ID[2]);
  Serial.print ("    ");
  Serial.println (ID[3]);
  // other stuff to compose CAN message
}
void CREATE_ID (byte Category, byte Name, byte Target, byte * IDbytes) {
  unsigned int ID;
  ID = (uint16_t) ((Category << 6 | Name ) << 3 | Target) << 5;
  IDbytes[0] = (ID>>8);
  IDbytes[1] = ID;
  IDbytes[2] = 0x00;
  IDbytes[3] = 0x00;
}

This gives me what I want while reducing the number of RAM-occupying even-local variables to a minimum and doesn't require that anything persist beyond the moment that I need it. I think it's also cleaner and easier to read.

BTW, aside from a general prejudice about using globals, I have a particular reason for wanting to limit their use in this program. Most of the people who will use this program have essentially no programming knowledge and absolutely no interest in learning that skill. It will have a section at the top containing global variables for "user settings" and I'd like to leave things unencumbered with other globals unless absolutely needed. Most all of the code will be moved into a library and I'll provide a relatively simple "manual" so that the user can personalize hes/her settings.

Ciao,
Lenny