Copyright Gray Area

Anyone know the copyright laws on stuff like product placement in books or say using like an entire music album as a basis of the story? For example what they did with ABBA and Mamma Mia or The Beatles and Across the Universe.

Is it possible to use an entire album as inspiration for a book, title of one song as the book title? Or would that be grounds for lawsuit? Even if you give credit to the album, band and everything? I have a good story idea but all inspiration springs from a certain album. Technically three, but that would involve a whole triliogy and I’m obviously not ready for that yet. Lol