From Twinfinite: “If youre looking to upgrade every weapon to its maximum level in Nier Replicant, then youll need to figure out how to gather some of the rarest materials in the game. This is easier said than done, though, as many of these materials only drop from specific enemies under certain conditions. Thats why were here to lend you a hand with a guide on how to get Memory Alloy in Nier Replicant.
Before going any further though, its worth noting that you wont be able to make use of the following information unless youve reached the second half of the game. If you havent reached this point yet, move your focus toward story progression for a bit and then come back to this task.”
Source: N4G PC Nier Replicant: How to Get Memory Alloy