Wireless sensor networks (WSN) consist of spatially distributed nodes that monitor physical conditions. In the past, most WSNs have been designed with a single specific application in mind. Recent developments however are expanding the applicability of WSNs and are increasing the demand for deploying multiple applications simultaneously. To host multiple applications in a single WSN, current solutions provide mechanisms for components to be dynamically deployed to nodes. However, two issues make the present form of dynamic deployment impractical for applications involving distributed collaboration and the redeployment of multiple distributed components. For one, existing works lack a suitable architecture for cooperation and interaction between components in WSNs. Another problematic aspect is the insufficiency of current methods in efficiently deploying multiple components throughout the network. To address these issues, we propose an architecture based on multiple components that have specific responsibilities in regard to deployment and a generative approach for dynamic deployment of such components.