Trees and arrays