The word - stupid

  1. How could you be so stupid(adj)?
  2. How could you be such a stupid(n)?
  3. He is a stupid(n).
  4. He is a stupid(adj) fellow.
    Are all these sentences OK?

‘Stupid’ is not a noun, except where you are calling someone that name (which is not a very polite thing to do).
That’s a daft idea, stupid!
Come on, stupid, keep up with the rest.
(Stupid is substituted for the person’s name here)
To take it to extremes:Don’t be so stupid(adj), stupid (noun)!

This is not the use that you have picked up in your sentences. In your sentences ‘stupid’ is an adjective every time.
2 needs an object
How could you be such a stupid man?
3 needs an object, as used in 4.

I think that ‘noun complement’ is the definition you need to describe the missing noun in the sentence: You are a stupid …