I would guess that x and y are always zero otherwise those loops are going to go past the array's limit.
To change a single element in a 2-dimensional array (as you have), you simply do it once; the loop is changing a single element multiple times (different elements).
So, to change the "map" array at (5, 2) to "1", you could do:
map[2][5] = 1;
To change a single tile in the example tile map, you'd need to add a method that modified that exact tile's vertices.
Basically, just do the code inside the double-loop (without the loops) and replace i and j with the x and y (respectively) of the tile's location.
Something like (in the TileMap class):
void changeTile(const unsigned int i, const unsigned int j, const int tileNumber)
{
// code from between those for loops goes here (but you should remove the "tileNumber = ..." line)
}