Implementation of an ADT 'bag' using an array