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;
  person_one.age = 44;
  person person_two;
  person_two.age = 89;

  person person_three;
  person_two.age = 23;

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

void setup() 


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!!