So having a bookmarklet or a sidebar browser extension you can have a overlay to extract and collect data from a website. Instead of using a popup for transferring it to a popup one could think of a localserver inside the browser, that can only be started from sandboxed code that has to be written and saved in the browser.
For example the Beaker Browser has introduced a editor for sandboxed code that can be shared over the web by peer2peer, e.g. a Twitter-like application (Video Demo by Tara Vancil JSConf EU 2018). This idea is not new, in fact, Opera Unite introduced it already back in 2009. Stackblitz is using WebContainers to include a virtualized TCP network stack mapping it to the browser's ServiceWorker API
to run Node.js locally. In the Chrome We Store you can find a Web Server running in the Browser.
There are already first steps taken to implement the File System Access API in browsers that comes with a lot of security issues, though. Having a sanboxed code environment and callable local server inside the browser could be an idea on how to enable to work with data and writing code for it.