Any Mac will "be able to" run Xcode, since it's based on Project Builder which was originally released over 30 years ago, and the fundamental system requirements haven't changed much. Just make sure it's new enough to run macOS Mojave.
However, event the fastest Mac money can buy still won't be as fast as you'd like it to be for some common tasks.
To have good performance, most people would agree the minimum is 16 GB of RAM (so that you can run code that hasn't got properly optimised memory management) and a modern PCIe SSD drive (which has a huge impact on compiler performance). Also, ideally you want an Intel CPU with hyper-threading - a quad core i7 will compile 8 files at once, while a dual core i5 will compile 2 files at once - even at the same clock speed an i7 is almost 4x faster for compilation (if you have a fast SSD).
The Mac Mini you're looking at doesn't meet those specs, while any MacBook Pro from the last few years does meet them.
Apple has allowed their desktop Mac lineup to languish, there aren't really any good choices right now:
* the regular iMac is a consumer Mac more suited to offices and schools than programming — I was given one of these at work and it's noticeably slower than the MacBook Pro I bought for myself.
* the iMac Pro has a high end GPU and display that make it ideal for video production bu unnecessarily expensive for programming.
* the Mac Pro is even more heavily tailored to video production, and it also tends to have heat related failures.
* the Mac Mini was updated in 2014 to make it *even slower* than the 2012 models. And the 2012 models were already unfortunately slow.
They've promised they're working on something better, but haven't said much about what it is or when it's coming. Personally if I had to buy a new Mac right now I'd get a 2015 year MacBook Pro with an i7 CPU (if you want performance) or an i5 CPU (if you want battery life).
You can run two external monitors on a MacBook Pro. And you can close the lid while a monitor/keyboard/mouse are attached to shut off the laptop monitor (I usually place a fridge magnet where the lid sensor is so I can shut off the monitor while still allowing hot air to vent out the keyboard).