Use a `WeakKeyDictionary` for `Runtime.arrays` so that the memory gets freed for arrays that are no longer used.