Going with a single server solution to host a 20+ TB storage array is going to be costly. Mainly because I wouldn't recommend cutting corners because you're going to greatly sacrifice reliability if you do so.
You can run a large storage pool using Windows Server 2012 R2 Essentials, which I really do like. You will have a difficult time finding a pedistal-type server system that can house that many hard drives, though. So I'd recommend looking into a rackmount system because there will be a lot more options. The down side here is often rackmount servers will cost slightly more than equivalent pedistal servers. For example, the HP ProLiant ML350p G8 vs. the ProLiant DL380p G8.
So, let's say that we can assume you will utilize a rackmount configuration for your storage, I would say you need to look into purchasing a 1U or 2U server with at least a dual-core processor (HIGHLY recommend a quad-core processor at least) and at least 8 GB of RAM. It's also recommended that you install your operating system on a separate set of hard drives in RAID 1 for fault tollerance and ease of configuration. Depending upon your budget, options, and space requirements you can even utilize some SSDs for this.
Now, you will need to invest in a RAID controller. Server will come with some form of integrated RAID controller, some of these are just basic onboard software RAID, but others do have a dedicated hardware RAID controller with onboard cache and even with battery or flash backups. I highly recommend utilizing a hardware RAID controller for the sort of storage that you are talking about! Much more reliable, greater compatibility, and overall better stability and performance. Your server will probably support the number of hard drive slots that are included with the server, but for the storage capacity that you are talking about, you should probably look into purchasing a DAS (direct attached storage.) This is also known as a drive shelf, and is basically just a drive enclosure for multiple hard drives that is connected through an external miniSAS connection (or several other types of high-throughput storage connection) back to a host server or controller card.
So, for example, let's say you purchase a 1U server which supports up to four large form factor (LFF) hard drives internally on a hardware RAID controller with 512 MB of cache. Put in two low to mid capacity SAS drives either 10k or 15k if you wish for high speed, or even some SSDs, and install your operating system. Then you'll use an additional PCI-Express RAID controller with at least one external miniSAS connector, and connect that to a DAS drive chassis. These come in many different sizes and support lots of different features, but for example you can purchase a single chassis which supports up to 24 LFF hard drives. Now you can fill up as many hard drives as you want in the DAS and configure the drives into your RAID array and control the storage all from your single server as if all of the hard drives were just directly plugged into that main server.
As always, there's other things to take into consideration. For example, your network topology and equipment, as well as ensuring that you have a good battery backup unit for all of this to help protect you from sudden power loss, power surges or brown outs, etc. which can not only cause damage to computer hardware but can also cause data loss or corruption.