Fans have been creating work based off of existing ideas for years. One way that they can (legally) get around copyright is by creating a parody which is protected as fair use under the First Amendment because criticism is considered free speech. I know that this is how Weird Al is able to parody songs. This website is helpful in explaining fair use:
Stanford Copyright and Fair Use Center
What Is Fair Use?
In its most general sense, a fair use is any copying of copyrighted material done for a limited and “transformative” purpose, such as to comment upon, criticize, or parody a copyrighted work.