Move randomness to allocated buffer