Access block indexes while using theme blocks

Previously, with section blocks, we were able to access the block index of the blocks using the for loop. Now, if we switch to using theme blocks, and render the blocks like this:
{% content_for 'blocks' %}
We can’t access the block index anymore. Is there a way to still get the indexes in Liquid while still using theme blocks?