What is the optimal approach for writing transitional coverage for each bits of a 4096 bit variable?

Simulation tools are very good a collecting toggle coverage without having to write any covergroups.

But as an academic exercise, see Bitwise toggle coverage for a bitvector - #2 by dave_59