# Notation for sampling a random variable

my question is pretty much the same as the one asked here: Notation for sampling random variate (I did not find a satisfying answer there...):

I have a random variable $X \sim U(1, 10)$. I want to define a function $f : [n] \mapsto \mathbb{R}$ (or an $n$-dimensional vector if you prefer) which is supposed to evaluate for each $i \in [n]$ to one value sampled from $X$.

I am describing how I generate data for a problem, internally I am using the C++11 random generator described here: http://en.cppreference.com/w/cpp/numeric/random

I am unsure how to write this as a formula, especially if I use some more complex way of computing the function, for example flipping a coin to decide whether I choose the value for one $i$ from one distribution or another.

-