If someone builds another product like Stack Overflow, can they be sued for some kind of patent/copyright infringement?
If yes, which parts of Stack Overflow design cannot be copied.
As far as my knowledge goes, technically, everything is copyrighted or has sort of copyright attachment to it even if they are allowing it under a permissive license such as GPL, CC, etc..
I would also suggest you reading the Stack Exchange Network Terms of Service. Look for any "Exclusive Copyright" or "All Rights Reserved" related stuff. If exists, then you must adhere those terms and conditions. Also, if a copyright issue occurs, usually the original copyright holder i.e. Stack Exchange, Inc. will send a DMCA takedown notice to them. Also, read the Guidelines for the Use of the Stack Exchange Trademarks page.
I would suggest reading the answer (and comments too) for Who owns the copyright to S[OFU] content?. It's worth and contains lots of good information related to Copyright material.
There are many things that goes into this matter.