C++ TArray insane memory usage

This article may help:
https://www.unrealengine.com/en-US/blog/optimizing-tarray-usage-for-performance

But are you sure there’s no other way to do what you’re trying to do?
Maybe you could start by changing from int to uint8?

https://docs.unrealengine.com/5.0/en-US/epic-cplusplus-coding-standardblueprint-debugging-in-unreal-engine/