Generate random field elements with std::uniform_int_distribution (instead of rand)