In children's illustrated books of nursery rhymes, Old Mother Hubbard's cupboard is shown in a variety of ways. Sometimes it's a free-standing cupboard; others, it's a cupboard attached to the wall.

I personally think of cupboards as attached to the wall in my neck of the woods. Wardrobes can be full-length closets attached or unattached for holding clothes.

I have no idea what a king's wardrobe, clothing aside, would be

Also, someone's wardrobe can be considered to be the overall clothing one has access to.

Interesting topic, yes. My wardrobe's in a mess, yes. I need to organize it!