Arrays are stored in HashTable strucures, and have the zval type IS_ARRAY. The API functions for creating, destroying and manipulating these structures as variables are documented here and can be found in Zend/zend_API.h
HashTable as Variable API
Prototype
Description
void array_init(zval* pzval)
initializes the variable as a HashTable, setting type and appropriate destructor function for the HashTable
void array_init_size(zval* pzval)
initializes the variable as array_init with a minimum of size buckets
Note:
Do not squint too hard looking for array_destroy: to destroy a variable array you should call zval_ptr_dtor on the variable, if there are no other references to the variable it will result in the array being destroyed.
Indexed Arrays API
Prototype
int add_index_long(zval* pzval, ulong index, long value)
int add_index_null(zval* pzval, ulong index)
int add_index_bool(zval* pzval, ulong index, zend_bool value)
int add_index_bool(zval* pzval, ulong index, zend_bool value)
int add_index_resource(zval* pzval, ulong index, uint value)
int add_index_double(zval* pzval, ulong index, double value)
int add_index_string(zval* pzval, ulong index, char* string, zend_bool duplicate)