I've saved an array to a global variable using global.set
In another function, I used global.get to extract that array but only a few elements existed!
Don't know what's happening at all...
Probably, between set and get, msg.payload (including pfex) was modified due to code execution. I assume that if you save array variables that contain objects, that variable behaves like a pointer.
You can try the following: you convert the array variable (object) to a string, and then at get you convert it to array. Just test.
In Javascript, objects are passed by reference. Arrays are just objects in JS, so the array you stored in the global context refers to the same one as the message payload.
Using an array object like a normal object is considered bad practice. What you should do, is creating a new object for your payload first, like msg.payload = {}, and set your properties after that.