With a cursor between empty double quotes, I would do (for n = 5):
i<CR>=join(map(range(5), 'printf("{%d}", v:val)'), ', ')<CR>
Some wimgolf enthusiasts can probably condense it further. But I would probably either write a mapping for it (if this happens so often), or do it manually:
5i{0}, <Esc>^f0;<CA>;2<CA>;3<CA>;4<CA>
source share