A cage should be big enough for the rabbit to stand up fully without hitting their head.
For a pen, it really depends on the rabbit. I have heard of rabbits that can jump a 4ft high pen and there are others that won't jump even a low barrier. For most rabbits, a 28-30 inch high pen is good, but 36" is more common for x-pens. If your rabbit can jump high, then a 4ft one might be better.
A dog x-pen will work. Most have 8 panels that are 2ft wide. They can form a pen that is 4X4ft, or 2X6. You can also make it so it attaches to the cage which would make for a bigger area.