a flex variable length array implementation