# [C++ (gcc)], <sup><s>197</s> \$\cdots\$ <s>185</s></sup> 184 bytes

<!-- language-all: lang-cpp -->

    #import<regex>
    using V=std::vector<int>;void f(V&v){V i=v,r=v;int y=0;for(int&a:i)a=y++;std::random_shuffle(&i[0],&*end(i));for(int n=rand()%v.size()+1,j=n;j;)r[i[--j]]=v[i[j%n]];v=r;}

[Try it online!][TIO-kxt0yvqs]

[C++ (gcc)]: https://gcc.gnu.org/
[TIO-kxt0yvqs]: https://tio.run/##1VFNb5wwEL3vrxhRBeHFRJuvtlnj7aHqLeqtXFgUEWOIt4tZ2YZuivjr3RqzTVaK0nssYc3Mm3nzeGa7XVQxdjh8EPWuUSZWvOL71azVQlaQUG2K5bLjzDQqFtKsSNeIAsog8TvUJyBohxXtiIXgiS5I2ajAxn6@FCinT2FIHIHKZdHU9/qxLcstD3yRLjLsz7ksAoHQvymQdGwM0Fl3rsVvHqDwAm@oJBuCVCrSKNpkGe1stDmTWUY6qshghUu2bQsOsWi0UTyv/6N@Nq6pcyED1M/AHu02GlHz4PuPuzsrxpVZI7UB9pirub05@8lVmgGF3lvvv12u97df7XfjYTjNr7xhmj5dm6zAcG30ONxfYLgcMPQ3GMYQwycM12Nhyq5shsGCHx3yGcPtcKS0FoHzSMiC7y3ZghzDeOI/OkYgDF0dwfSD40nA2AnXljowI8@Y08qa1kAcg5d6L4hbORmRt6bxQRgFSzCnzK8Y7NvaLkrBn5vzB16NTsMX8Dw7OdqFxibb8rJmeENKBtEKTuUEBr0H2d5bItfyCA2z4fCHldu80ofo118 "C++ (gcc) – Try It Online"  

_Added 2 bytes to fix an error._   
_Saved 3 bytes thanks to [ceilingcat](https://codegolf.stackexchange.com/users/52904/ceilingcat)!!!_   

Inputs a vector of integers.   
Randomly shuffles a random subgroup of the elements in place.