GArray
GArray is a dynamic array data structure provided by GLib, the foundational utility library used by GNOME and GTK. It stores elements contiguously in memory and uses a fixed element size defined at creation time, allowing it to hold any plain-old-data type such as integers or structs. The API is designed to be generic, enabling easy storage of various element types without rewriting code for each type.
Creation and memory management: A GArray is created with g_array_new, which takes the size of each element
Operations and access: Common operations include appending values (g_array_append_val, g_array_append_vals), inserting and removing elements (g_array_insert_val, g_array_remove_index),
Variants and usage: GLib also provides GPtrArray for arrays of pointers and GByteArray for raw bytes. GArray