Array as return value from function

Hi there,

I am a kind of confused.
I am trying to get data from a function by returning an array.
I don´t want to use global variables except global pointers.

This is how I tried it.

typedef struct person
{
  char first_name[20];
  int age;
};

person (*p)[3];

void getnew_person()
{
  person all_persons[3];
  
  person person_one;
  strcpy(person_one.first_name,"Peter");
  person_one.age = 44;
  
  person person_two;
  strcpy(person_two.first_name,"Tom");
  person_two.age = 89;

  person person_three;
  strcpy(person_two.first_name,"Jane");
  person_two.age = 23;

  all_persons[0] = person_one;
  all_persons[1] = person_two;
  all_persons[2] = person_three;
  
  
  p = &all_persons;
 
}


void setup() 
{
  
  Serial.begin(9600);
  getnew_person();

}

void loop() {
  // put your main code here, to run repeatedly:
    
Serial.println(p[0]->first_name);//works fine: output is "peter"
Serial.println(p[2]->first_name);//output is "ter"
  
}

Strangely the output is just for Serial.println(p[0]->first_name); correct.
Else the data is not complete and the output shows a part of another name.

Does someone know how I can deal with this problem?

Thanks for your help!!