A recently-published patent application by Apple describes a two-way communication method between AirPlay devices.
Currently, AirPlay works one way: You beam an image to an Apple TV from a computer or iOS device, and it shows up on the television’s screen. However, this patent application describes a method in which various applications could provide different user interfaces (UI) on your iPad or iPhone. From the sound of it, this works something like the second screen feature we see sometimes talked about for viewing. Perhaps you can buy a movie on iTunes and watch it with a second screen, which would tell you more about the movie you’re watching. Perhaps it’s more about control inputs for games. It’s not entirely clear at this point how extensive it would be, but the short of it is that you’d be able to control applications with your separate device.
Furthermore, the patent application talks about a television with built-in Apple TV functionality, as Patently Apple pointed out. While there’s speculation that it may be an Apple HDTV, it seems like it’s more likely Apple is just covering its bases or talking about any current internet-enabled television. After all, Apple does want AirPlay to be used by various types of devices.