move fetch to separate file, use zend_hash_next_index_insert instead of zephir_array_append if the variable is an array