Replace?

So I’ve been working on a game for quite some time now and I just hit a block when I don’t have time for one. Is there anyway I can replace a random block on the tile map with a certain block (kind of like the replace all ___ with ___ but just one singular ___ replaced with ___)