A question about definable elements in a model of ZFC Let $\langle M,E\rangle$ be a model of $\mathsf{ZFC}$.
Does there exist a $d\in M$ such that, for all $a\in M$, $a\mathrel{E}d$ if and only if $a$ is definable in $\langle M,E\rangle$ without parameters?
A result of J.D. Hamkins, etc. (cf. Pointwise definable models of set theory) shows that, for some models of $\mathsf{ZFC}$, such a $d$ cannot exist. Is there a model in which such a $d$ exists?
 A: In the paper you mention in the original post, we mention several of the possibilities as follows. Item (v) includes the particular situation you asked about.
Hamkins, Joel David; Linetsky, David; Reitz, Jonas, Pointwise definable models of set theory, J. Symb. Log. 78, No. 1, 139-156 (2013). ZBL1270.03101. blog post

Let us now turn to the question of the extent to which
  definability is first-order expressible, by presenting a
  number of examples that illustrate the range of
  possibility. We have already observed that the property of
  a model being pointwise definable is not first order
  expressible, since it is not preserved by nontrivial
  elementary extensions. Since pointwise definability is a
  strong generalization of the axiom $V=\newcommand\HOD{\text{HOD}}\HOD$, it is tempting
  to introduce such notation as $V=D$ or $V=HD$ to express
  that a model is pointwise definable, thereby maintaining a
  parallel to the classical $V=\HOD$ notation while
  emphasizing that the definitions need no parameters. We
  hesitate to adopt this notation, however, because we fear
  it would incorrectly suggest that the concept is
  first-order expressible, which isn't the case.
(i) There is no uniform definition of the class of
  definable elements. Specifically, there is no formula
  $\mathop{\rm df}(x)$ in the language of set theory that is
  satisfied in any model $M\newcommand\satisfies{\models}\satisfies\newcommand\ZFC{\text{ZFC}}\ZFC$ exactly by the
  definable elements. The reason is that if $M_0$ is
  pointwise definable and $M_0\prec M$ is a nontrivial
  elementary extension, then the definable elements of $M_0$
  and $M$ are precisely the elements of $M_0$, and so $M_0$
  should satisfy $\forall x\,\mathop{\rm df}(x)$ but $M$
  would satisfy $\exists x\,\neg \mathop{\rm df}(x)$,
  contrary to $M_0\prec M$.
(ii) The class of definable elements can form a
  definable class. Although there is no uniform definition
  of the class of definable elements, it can sometimes happen
  that a model enjoys a certain structure that allows it to
  see its collection of definable elements as a definable
  class. For example, in a pointwise definable model, the
  class of definable elements includes every object and is
  therefore defined by the formula $x=x$. See also (iv) and
  (v) below.
(iii) The collection of definable elements might
       not form a class. Consider any model
       $M\satisfies\ZFC$, and let $N$ be an ultrapower of
       $M$ by an ultrafilter on the natural numbers. The
       parameter-free definable elements of $N$ are
       necessarily contained in the range of the
       ultrapower map, and in particular, do not include
       any of the newly added nonstandard natural
       numbers. Thus, the class of definable elements of
       $N$ is not amenable to $N$, for it would reveal
       that its natural number are not well-founded.
(iv) The definable elements can form a definable
       class in a model having no class function $r\mapsto\psi_r$
       mapping definable elements to definitions. Suppose
       that $M$ is a pointwise definable model of $\ZFC$.
       The definable elements of $M$ are all of $M$,
       which is certainly a definable class in $M$. But
       $M$ cannot have a function $r\mapsto\psi_r$
       associating to each element $r$ of $M$, or even to
       each real of $M$, a defining formula $\psi_r$,
       since such a map would reveal to $M$ that it has
       only countably many reals.
(v) The definable elements can be a set in a model
  that does have a definability map $r\mapsto\psi_r$. 
  Suppose that $\kappa$ is an inaccessible cardinal (this
  hypothesis can be reduced), and observe by a
  Lowenheim-Skolem argument that there are numerous
  $\gamma<\kappa$ with $V_\gamma\prec
V_\kappa\satisfies\ZFC$. It follows that the definable
  elements of $V_\kappa$ are all in $V_\gamma$ and satisfy
  the same definitions there as in $V_\kappa$. Since
  $V_\gamma$ is a set in $V_\kappa$, we may construct in
  $V_\kappa$     the function $r\mapsto \psi_r$ that maps
  every     definable element $r$ of $V_\gamma$ to the
  smallest definition $\psi_r$ of it, and because
  $V_\gamma\prec V_\kappa$, this function has the same
  property with respect to $V_\kappa$, as desired. The large
  cardinal hypothesis can be reduced; it is sufficient to
  have an $\omega$-model $M$ with some $M_0\in M$ having
  $M_0\prec M$.
(vi) No model can have a definable definability
  map $r\mapsto\psi_r$. If such a map were definable, then
  since there are only countably many definitions $\psi_r$,
  we could easily diagonalize against it to produce a
  definable real not in the domain of the map. In (v), the
  map is definable from parameter $\gamma$.
The surviving content of the math-tea argument seems to be
  the observation that in any model with access to a
  definability map $r\mapsto\psi_r$, the definable reals do
  not exhaust all the reals.

A: For definiteness we say that $a$ is definable in a model $\langle M,E\rangle$ of ZF if there is a formula $\varphi$ with one free variable in the language with one non-logical symbol $\in$ with the property that $\langle M,E\rangle\models\phi(x)$ iff $x=a$. (The Gödel number of such a formula must be standard.)
The condition given by Joel David Hamkins in the last sentence of (v)
of his answer is necessary and sufficient for there to be a set in $M$ consisting of the definable elements of $M$:

Theorem. For any model $\langle M,E\rangle\models\mathrm{ZF}$, the following are equivalent:

*

*There exists a $d\in M$ such that for all $a\in M$, $a\mathrel{E}d$ if and only if $a$ is definable in $\langle M,E\rangle$.


*$M$ is an $\omega$-model, and there is $N\in M$ such that $N\prec M$.

Proof:
1 → 2: Suppose $d\in M$, and for all $a\in M$, $a\mathrel{E}d$ if and only if $a$ is definable in $\langle M,E\rangle$.

Claim. Let $M\models\text{“$\alpha$ is the least ordinal not in $d$”}$. Then $V_\alpha^M\prec M$.

Proof: Write $V_\alpha$ for $V_\alpha^M$. We prove
$$\forall p_1,\dots,p_n\in V_\alpha\:\bigl(V_\alpha\models\phi(p_1,\dots,p_n)\iff M\models\phi(p_1,\dots,p_n)\bigr)\tag1$$
by induction on the complexity of $\phi$. For atomic formulas $\phi$, (1) holds.
Suppose that (1) holds for $\phi$ and $\psi$. Then
$$\begin{align*}
V_\alpha\models\phi\land\psi&
\iff(V_\alpha\models\phi\text{ and }V_\alpha\models\psi)\\
&\iff(M\models\phi\text{ and }M\models\psi)
\iff M\models\phi\land\psi.
\end{align*}$$
Also,
$$V_\alpha\models\neg\phi\iff ¬V_\alpha\models\phi\iff ¬M\models\phi\iff M\models\neg\phi.$$
Suppose (1) holds for $\theta(x,\dots)$. If $V_\alpha\models\exists x\,\theta(x,p_1,\dots,p_n)$, then $V_\alpha\models\theta(p,p_1,\dots,p_n)$ for some $p\mathrel{E}V_\alpha$. Therefore $M\models\theta(p,p_1,\dots,p_n)$ and so $M\models\exists x\,\theta(x,p_1,\dots,p_n)$.
Finally, suppose $M\models\exists x\,\theta(x,p_1,\dots,p_n)$ for $p_i$ in $V_\alpha$. Then there is an ordinal $\delta$ in $d$ such that $\{p_1,\dots,p_n\}$ is contained in $V_\delta$. $\beta\mathrel{E}d$ must hold for the least ordinal $\beta$ such that $\delta\mathrel{E}\beta$, $V_\beta$ reflects $\exists x\,\theta$, and $V_\beta$ reflects $\theta$. Therefore $M\models\theta(p,p_1,\dots,p_n)$ for some $p\mathrel{E}V_\beta$, and consequently $V_\alpha\models\theta(p,p_1,\dots,p_n)$, and thus $V_\alpha\models\exists x\,\theta(x,p_1,\dots,p_n)$.
This completes the proof of the Claim. It remains to prove that $M$ is an $\omega$-model.
For each $a\mathrel{E}d$, let $g_a$ be the least Gödel number of a formula which defines $a$ in $V_\alpha$. There is a set $S\in M$ consisting of the $g_a$ for which $a\mathrel{E}d$. Since $S$ is an infinite set of standard natural numbers, its union must be $\omega$. Thus, $\omega\in M$, and $M$ is an $\omega$-model.
2 → 1: Suppose $M$ is an $\omega$-model, $N\in M$ and $N\prec M$. There is a $d\in M$ such that $b\mathrel{E}d$ iff $b\mathrel{E}N$ and
$M\models\text{“$b$ is definable in $N$”}$. Then $b\mathrel{E}d$ if and only if $b$ is definable in $\langle M,E\rangle$.
