[TEST] Random dynamic templates.

This change randomly indexes the _id field and randomizes field data formats
and loading.

Close #5834