simple arrayList implementation in c