I need a distance sensor (IR or Optical or any other) with 90 degree view angle to sense a rectangle surface. in this case sensor must putting at the same level of surface area. please help me to solve this.
I can think of two approaches to your problem.
Use a stereo camera pair. You can use a stereo camera pair utilizing a camera with a 90 degree field of view while setting the appropriate baseline to the range of or minimum distance from the from the two cameras which the rectangle needs to be detected. It fairly easy to implement. You can find many sources online. It can also be implemented on common SBC's such as the Raspberry Pi. See here:Example Implementations using the Raspberry Pi I am currently able to get 6 fps for my purposes for the previous 2 fps.
Use a LIDAR sensor with the appropriate field of view. A colleague of mine working with our lab's automated vehicle utilized the LIDAR Lite sensor (lowest cost LIDAR sensor I think while also designing a sweep mechanism using a cheap motor) to get a 1-dimensional 360 degree sweep of his surroundings and characterize the objects through clustering if they are a pole, a wall or a car. I think you can do a similar approach but in 3D. See this for reference: https://www.kickstarter.com/projects/scanse/sweep-scanning-lidar/description. It also uses the Lidar Lite but the second version.
There are many more approaches to the problem like using an ultrasonic or IR sensor matrix, but I think the 2 above are the most effective and easiest approach however not necessarily the lower cost option.
I hope it helps :)