How would be the structure to a movie database with casts?

Yes its possible. To achieve this, you need to write your own custom controller. I would suggest you to have different routes for different pages(if you need different type of data) and write respective controller to get data in desired format.