Individual data structure in Doctrine with custom Hydrators

Code
<?php

use Doctrine\ORM\Internal\Hydration\AbstractHydrator;
use 
PHPSnippets\Db\Entity\Test;

class 
ArrayIteratorHydrator extends AbstractHydrator
{
    protected function 
hydrateAllData()
    {
        
$result = array();

        while (
$data $this->_stmt->fetch(\PDO::FETCH_ASSOC)) {
            
$result[] = new ArrayIterator($data);
        }

        return 
$result;
    }
}

$entityManager->getConfiguration()
    ->
addCustomHydrationMode('MyHydrator'ArrayIteratorHydrator::CLASS);

$qb $entityManager->createQueryBuilder();
$result $qb->select('t')
    ->
from(Test::CLASS, 't')
    ->
setMaxResults(5)
    ->
getQuery()
    ->
getResult('MyHydrator');

foreach (
$result as $id => $row) {
    
dump($row);
}
Result
^ ArrayIterator {#1417
-storage: array:3 [
"id_0" => "1"
"name_1" => "foo"
"creation_date_2" => "2014-07-20 11:37:29"
]
flag::STD_PROP_LIST: false
flag::ARRAY_AS_PROPS: false
}

^ ArrayIterator {#1418
-storage: array:3 [
"id_0" => "2"
"name_1" => "test"
"creation_date_2" => "2014-07-20 10:40:22"
]
flag::STD_PROP_LIST: false
flag::ARRAY_AS_PROPS: false
}

^ ArrayIterator {#1419
-storage: array:3 [
"id_0" => "3"
"name_1" => "bar"
"creation_date_2" => "2014-07-23 07:27:18"
]
flag::STD_PROP_LIST: false
flag::ARRAY_AS_PROPS: false
}
Used Versions
PHP 8.0, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8