Looping Back to setup after void loop() has run a random number of times

setup() is just a function. If you count your loop executions, you should be able to do something like:

if(++loopExecutions > random(17)){
  setup();
  loopExecutions = 0;
}