This seems suspicious to me because the entities already have `ArrayAccess` - this operation seems unnecessary. If we really want to work with pure arrays, we should use array hydration in the `find()` call above (line 102). CategoryUtil was just referencing arrays entirely so either we need to keep it that way, or if we're using object hydration we can do away with all this stuff that builds arrays of categories and their parents.