Suppose we have some bounded Borel set $B\subset {\mathbb R}^n$. Let a function $f:B\to \mathbb R$ be uniformly continuous on B in the sense that $$w(r):=\sup_{x,y\in B\ :\ |x-y|\le r}|f(x)-f(y)|<\infty$$ for all $r>0$, and $w(r)\to 0$ as $r\to +0$. Is it always possible to extend the function $f$ to a convex envelope of $B$ or the whole ${\mathbb R}^n$ so that the uniform continuity would persist?
Can the extension be done preserving the modulus of continuity $w(r)$ when $w(r)$ is concave?
The answer to the last question is positive. See Theorem 2 in McShane, E. J. (1 December 1934). "Extension of range of functions". Bulletin of the American Mathematical Society. 40 (12): 837–843. doi:10.1090/S0002-9904-1934-05978-0
The extension can be built as $$f(x)=\sup_{y\in B}\ \{f(y)-w(|x-y|)\}.$$
Note that the value of $f(x)$ is preserved for $x\in B$, since $f(y)-w(|x-y|)\le f(x)$ by the definition of $w(r)$. It also easy to prove that the new $f(x)$ satisfies the modulus of continuity $w(r)$, since, for each $y$, $f(y)-w(|x-y|)$ satisfies it.
Actually for the proof we need that only $w(a+b)\le w(a)+w(b)$ for all positive $a,b,c$, but not the general concavity.