(PUP-1029) Update documentation of map function

Updates documentation of the map function to also show examples
of using index/value, key/value.