Array seems to change at random

I define an array from another array in a loop. When I print from within this loop the created array is as expected, but when I print from outside the loop it changes.

int PDOL_response[PDOL_Length];
for (int i = PDOL_start_index; i < (PDOL_start_index + PDOL_Length); i++){
  for (int j = 0; j< PDOL_Length; j++){
  PDOL_response[j] = (response[i]);
 Serial.println(PDOL_response[j],HEX);
  break;
  }
}

This outputs:

9F, 35, 01, 9F, 6E, 04, 9F, 4E, 20
for (int i = 0; i<PDOL_Length; i++){
  Serial.println(PDOL_response[i],HEX);
}

This outputs:

20, 5101, FFFFE200, FFFF9007, FFFF8107, 0, 100, 503, FFFFBD0C

Please post a complete sketch that illustrates the problem so that it can be seen in context

For instance, where are the variables defined and what is their scope ?

It looks like you try to print contents of the local variable beyond its scope.
Read something about the scope of variables in the C++

not clear what the values are in both PD0L_response [] and response []

in the more conventionally formatted code below, the "break" prevents j from every getting beyond a value of 0 which is since PDOL_response [0] is set to response[i] means the values in response []

int PDOL_response[PDOL_Length];
...
    for (int i = PDOL_start_index; i < (PDOL_start_index + PDOL_Length); i++){
        for (int j = 0; j < PDOL_Length; j++){
            PDOL_response[j] = (response[i]);
            Serial.println (PDOL_response[j], HEX);
            break;
        }
    }
...

Post complete sketch that produces unexpected output

Since you break out of the 'j' loop after the first iteration, this is the same as saying:

  PDOL_response[0] = response[i];
  Serial.println(PDOL_response[0],HEX);

That is obviously NOT what you thought you were doing. What is it you thought you were doing? Moving all of the bytes into ints, for some reason?

So you are basically printing 'response[i]':
9F, 35, 01, 9F, 6E, 04, 9F, 4E, 20

Since you are only ever setting 'PDOL_response[0]' it makes sense that the first element is the last value it was set to and the other elements are garbage.

I think what you might have wanted is:

  byte PDOL_response[PDOL_Length];
  for (int i = 0; i < PDOL_Length; i++)
  {
    PDOL_response[i] = response[PDOL_start_index + i];
    Serial.println(PDOL_response[i], HEX);
  }