Properly handle definition objects for arrays.

Signed-off-by: Yorick Peterse <yorickpeterse@gmail.com>