Fold array with objects

ValueToken assumed subPaths were arrays which breaks due to .slice being called when subPaths are objects.