Json Write New Array Python Memory Allocation