I am looking for a formula $y_i = f(i, \kappa)$, for $i=1...K$ data points, that generates a convex function like this one:
The function should contain a parameter, e.g. $\kappa$ that can handle the amount of convexity. Ideally, setting this parameter to a certain value should give equal weights (e.g. $y_i = y_j$ for all $i=1...K$)

You can combine basic convex functions, e.g. $$y_1(x) = \sum_{i=1}^K (x-i)^2$$ and then renormalise them to obtain $$y(x) = \frac{y_1(x)}{\sum_{i=1}^K y_1(i)}$$