Let $\kappa$ be an infinite cardinal, and take a set $X$ of cardinality $\kappa$. Consider $X$ as a first-order structure with respect to the language that consists of all possible finitary relations on $X$. For which values of $\kappa$ does this structure have a nontrivial elementary extension of the same cardinality?
This question is inspired by the question Are there countable non-standard models of true arithmetic formulated in the uncountable "full (first-order) language of arithmetic"? which asks about the special case $\kappa=\aleph_0$. In that case my answer there shows that every nontrivial elementary extension has cardinality at least $2^{\aleph_0}$, so the answer is no. More generally, it follows that the answer is no if $\kappa<2^{\aleph_0}$.
On the other hand, any ultrapower of $X$ is an elementary extension, and a nontrivial one as long as the ultrafilter is not $\kappa^+$-complete. So by taking a ultrapower by a nonprincipal ultrafilter on $\omega$, you get a nontrivial elementary extension of cardinality at most $\kappa^{\aleph_0}$. In particular, if $\kappa$ satisfies $\kappa^{\aleph_0}=\kappa$, this means the answer is yes.
(Note that in fact a nonprincipal countable ultrapower always has size $\kappa^{\aleph_0}$, so you can't do better using countable ultrapowers. Proof: Identify $X$ with the set of finite sequences of elements of $\kappa$, and for each $\omega\to\kappa$ consider the element of $X^\omega$ corresponding to its initial segments. Any two of these elements agree on only finitely many terms, so they give distinct elements of the ultrapower.)
But there are also other cases where the answer is yes. For instance, if $\mu$ is a measurable cardinal and $\kappa>\mu$ is a cardinal with $\operatorname{cf}(\kappa)<\mu$ and $\lambda^\mu\leq\kappa$ for all $\lambda<\kappa$, then an ultrapower of $X$ by a $\mu$-complete ultrafilter on $\mu$ will have cardinality $\kappa$ (see my answer linked above for more details). In particular, if you pick $\kappa$ to have cofinality $\omega$ (for instance, $\kappa=\beth_\omega(\mu)$), this gives an example where the answer is yes but $\kappa^{\aleph_0}>\kappa$.
I don't know the answer in any cases besides these; for instance, I don't know the answer for $\kappa=\aleph_\omega$ if $2^{\aleph_0}<\aleph_\omega$. In the general case where $\kappa^{\aleph_0}>\kappa$, is there a characterization of those $\kappa$ for which the answer is yes? Can the answer ever be yes if $\kappa^{\aleph_0}>\kappa$ and no measurable cardinals exist?
I would also be interested in answers that discuss natural related questions, such as what the smallest possible cardinality of a nontrivial elementary extension of $X$ is in general. Can it ever (consistently) be strictly between $\kappa$ and $\kappa^{\aleph_0}$?