Young peafowl do everything the adults do- except the females don't lay eggs until much later...

I've seen chicks as young as ONE week old go through all the treading/mating actions. Sometimes there will be a few juveniles that like to engage in the behaviour fairly frequently.

From what I can tell it seems to be regarded as play for them. There's no harm in it.

Adult peacocks can fertilize chickens and guineas, all turn out mules though- not fertile.