I think the way to do it is by storing the board as a list that tells the locations of tiles and whether they're mines, so if you want to know if a tile is a mine, just check of "X/YT" exists, for example. At least that's how I did it, and it worked out well
I'm pretty sure the hardest part is just getting the numbers to be accurate, which I also struggled with for the longest time before switching to lists instead of the "touching" block