How to use an array inside a for statement

I have used this hack to achieve this. Use the set variable function to concatenate a string that includes the parent_custom_widget_name variable**.** The parent_custom_widget_name includes the appended number for the module instance on the page. Then use your custom variable where you want the content.

{% set string = "{{widget_data" ~ "." ~ parent_custom_widget_name ~ "_my_content" ~ ".value}}" %}

<p> {{string}} </p>