#Japt, 7 bytes
ËÆD
c ö
##Explanation
Implicit input of array U
.
Ë
Map over the array passing each element through a function where D
is the current element.
ÆD
Generate an array of length D
and fill it with D
.
c
Flatten.
ö
Get a random element.