I don't quite know why definitions of "compact" use the expression "arbitrary collection".
Am I correct in thinking that the following predicate is a definition of compact?
Let $X$ by a set with topology $\mathcal T$,
$\mathrm{compact}(X):=\forall (Y\subset \mathcal T).\ \exists (k\in\mathbb N).\ \exists (f:\{0,1,2,\dots,k\}\to \mathcal T).\ Y\subset\mathrm{im}(f)$
No. It can't possibly be correct because the right-hand side of the definition omits $X$.
You also need the codomain of $f$ to be $Y$, not $\mathcal T$. Compactness doesn't say that a set has a finite covering (which every set trivially has); it says that every covering has a finite sub-covering.
Also you have the types mixed up. On the left, $Y$ is a family of open sets. On the right, you claim that $Y$ is a subset of the image of $f$. But this is certainly not true in general, since $Y$ could be an infinite family, but the image of $f$ is the finite set $\{f(1), f(2), \ldots, f(n)\}$. I think what you're getting at is that $\bigcup Y\subset \bigcup_i f(i)$, but even this isn't quite what you want.
Try this: If $C$ is an open covering of $X$, that's $X\subset \bigcup C $ where $C\subset\mathscr T$, then there is a finite subcovering $S\subset C$ that also covers $X$, so $X\subset \bigcup S$. Try this: $$ \forall C\subset{\mathcal T}.\left( X\subset \bigcup C \implies \exists S\subset C . \text{$S$ is finite and }X\subset \bigcup S\right).$$
You can replace “$S$ is finite” with some squiggle-squoggle involving functions from $\{1,\ldots,n\}$, but I don't see the benefit.