[PDI-12188] - Moving allocation of arrays to before their use