Reverted change to extractfromarrayofstructs function