Widget internal hooks and functions

Take a look at the default-widgets.php and widgets.php files from wp-includes folder. You’ll find a couple of filters and actions there which will help you. You’re gonna have to try them out, they aren’t documented.

Create a list in array, preferrably of all widgetized areas and their id.
– Use the filter sidebar_widgets, it will give you the ids of all widgets and their corresponding areas as an array. This post will give you an idea of how you can use sidebar_widgets filter.