A generic dynamic array with add(), size(), removeLastElement(), and get()