The loop accidentally overwrote the whole array in every iteration.
It's not necessary to define these empty arrays at all: when working
with multi-dimensional arrays, PHP will create them as needed.
Follow-up to 4835b6b1cb.
Bug: T323491
Change-Id: I5043efc31722d2b9cd2a8dd482594355a761008e