There's a 1TB Western Digital Black and a 24 GB Apple SSD in your computer.
You can essentially replace both of them.
The hard drive is the usual 3.5" SATA slot. While the Apple SSD slot uses a M.2 adapter.
So something like a 850 Pro will do. I would only do this if I was a very experienced computer specialist. Disassembly the Apple Mac 5K is a very risky process and can result in potentially damaging cables or shocking yourself.
iFixit Disassembly guides here:
Hard Drive:
[guide|30522]
Solid State Drive:
[guide|30537]