If I were you, I wouldn't choose an Imac for X-plane, because it runs better with an Nvidia GPU.
If you want an Imac and nothing else, the GPU is the most important element.
To see how powerful it will be, you can type in google "benchmark [your GPU] GTX1070" and this will give you an interesting indication.
Now, I think 8Go of RAM can do. If I were you, I would install the demo and check how X-plane runs (the demo and the full game have exactly the same framerate). According to that, you can decide later if you want to upgrade to 16Go.
For example, I have a GTX970, 8Go of RAM and I'm happy with it on a Full HD display, if it can help (30 fps most of the time). The faster your GPU, the more RAM you will want to have.
I'm sure you checked that page already, but just in case :