Not everything JK pulled from is out of copyright. But generally Authors are allowed to reuse all sorts of things. Compare say Battle Royale to the Hunger Games. Writing a story about Kids fighting to the death doesn't give you a monopoly on that storyline.
See this link, lots of recent works in there.
https://en.wikipedia.org/wiki/Harry_Potter_influences_and_an...