(I read this question as asking about constructing such sets in ZF-Foundation alone)
Essentially you are asking for a set $x=\{x\}$ in ZF without foundation.
The problem is that just without foundation you don't get enough. Every model of ZF is a model of ZF without foundation.
There are methods of constructing models in which the axiom of foundation fails, and you can control this failure quite nicely. These are methods which are similar to methods in which the axiom of choice is negated.
The most celebrated method is due to Specker and uses atoms and results in sets for which $x=\{x\}$.
Edit: I spoke with my teacher who taught me the method to generate models without the axiom of foundation from models with atoms, and he said that he came up with the method by himself. He figured that someone else had written about it before, so he didn't bother to publish it. While I am certain that Specker worked on similar ideas I could not find a reference. I will take it upon me to write a note on the method my teacher used.
I will update this when the note is prepared, for whoever is interested.