Copied info from processes into struct pi using for loop