Let $\mathbf{G}$ be the set of (edit: convex) functions $g: X \to [0,1]$, where $X$ is a compact subset of $\mathbb{R}^d$ or something like that.
Suppose I have a distribution $D$ on $\mathbf{G}$. Let $\bar{g}: X \to [0,1]$ be the pointwise average $$ \bar{g}(x) = \mathbb{E}_{g \sim D} g(x) . $$
When I draw $n$ functions $g_1,\dots,g_n$ from $D$ i.i.d., let $\hat{g}_n$ be a random variable equalling the empirical pointwise average, $$ \hat{g}_n(x) = \frac{1}{n} \sum_{j=1}^n g_j(x) . $$
Recall that $\| f \|_{\infty} = \sup_{x \in X} |f(x)|$. I'd ideally like a bound of this sort
$$ \Pr\left[ \| \hat{g}_n - \bar{g} \|_{\infty} > \epsilon \right] ~~ \leq ~~ ??? $$
Are there known inequalities of this form? I'd naively hope for something like $O(e^{-n\epsilon^2})$. If it's not true, it'd be great to know conditions that make it true (all functions are continuous, Lipschitz, ...?).
(Edit: (1) I should mention the related DKW inequality that inspires this goal. (2) Changed the condition on functions to be convex, due to ClementC.'s counterexample below.)
This question was asked and answered on MO: https://mathoverflow.net/questions/171527/concentration-inequalities-in-ell-infty-for-sums-of-iid-random-nice-fu
The keyword for this type of problem is "empirical process", and references exist.