Decision tree for arrays