Structured brainstorming has helped me a lot. I have ideas for specific protects at completely random and arbitrary times, and they disappear if I don't immediately lay them out. By adding a mind mapping app (MindNode, iOS) on my phone, I can quickly add new thoughts and ideas to my outline of a project in a way that's easy to follow later, and I'm not wasting near as much of the time when I can actually sit down and work on trying to reconstruct those random thoughts.
I've done similar with my nonfiction reading. MarginNote also allows me to turn quotes and blurbs into mind maps quickly and easily, so I'm able to more quickly retrieve information when I want it.
If you search mind map, you should be able to find a variety of options. I can't vouch for one specifically.
I did look to see if there was a multi platform app that similarly met my needs like MarginNote (to use with my ereader), but I wasn't able to find anything I didn't consider a meaningful downgrade. There are a lot of note taking apps out there, but none of them seem to work well as both readers and notes simultaneously. I haven't done a deep dive yet, but there were a lot of "there's not a good comparison" in other threads on it.
Edit: switched to the "framework mode" and showing the early version of working through marking the book up for real instead of the last version. The same thing can be switched to a mindmap with one click, but this feels better for this content:
I won't show the content of any of it, but just to show the widget and that I actually do use the mind mapping for random projects that may or may not go anywhere: