Cornell University has a NASA NIAC study for a fully modular self-assembled massive space telescope. They are taking mirrors segments based on the current James Webb space telescope mirror segments and then adding in some adjustments so that each piece can function in any random location. They also add solar sails and velcro attachments so that the modules with solar sails can come in contact and stick together. After the object settle then they use magnets to creep into the exactly the correct position to fit together for a larger telescope mirror. The solar sail would be detached and tethered as a sunshade.
800 some modules could form a 30-meter space telescope. Such a telescope would be able to image the surface of an exoplanet and differentiate between a world with a supercontinent or with other continent distributions.
They have determined the best orbit to assemble the modules. It is an orbit with some complexity but with the benefit that modules would bump into each other at low speeds.