I would do something like this:
- the carousel widget get's one field "DataSource". Use a page selector.
- add a data page type for a carousel slide. Add image and text here.
- use the code generator to generate info and provider classes of the carousel slide page type.
- The widget rendering can now access the parent page of your slides over the data source field (guid)
- Use the slide provider class to get all slides unter the data source guid page.
- use a foreach loop to iterate over the slides. You can use the info class to access the properties directly. No need for a macro.