broadcast the vector into length n

broadcast_vector(x, n)

x

vector

n

target length

broadcast_vector(1:3, 5)