This is a simple assignment to create a template class unbound_arr<T> which represents an unbounded array of type T. Your template class may have a default a constructor if needed, and a whopping two methods:
The template assumes that type T has a default constructor and can be compared with ==.
The simplest way is to store your data in a private map, int to T. The map itself already behaves in a similar way, except that it is not careful to avoid storing unneeded data. In particular, get must not use bracket subscripting, since that will always store an entry if the subscript does not exist. Either use the find method on your map, or use the at method and catch the exception when the item is not present.
Your put method should only add the item to the map if x is not equal to T(). If a position with a different value is replaced with T(), it should be deleted rather than stored.
There is a small test driver here.