The wing design is different between F-16 and F-22 (which is similar to YF-23) because the requirements were different.
The wing of F-22 (and that of F-23) were designed with stealth in mind, with the wing (and control surface) edges parallel to each other. There was no such design requirement in case of F16.
F-16 is a highly maneuverable aircraft in its own right. However, there are some reasons the F-22 is more maneuverable (i.e. it is super maneuverable) compared to the F-16, most of which are unrelated to wing design.
In general, lesser the wing loading, higher the performance. F22 has a lesser wing loading compared to F-16 (377 kg/m² vs 431 kg/m²). Though this figure will vary depending on various conditions, the F-22 has a lower value, helping in maneuverability.
The F22 has thrust vectoring, which basically acts to increase the control authority and also helps in controlling in high alpha region where the conventional controls would've become unusable.
The F22 is maneuverable in the post-stall region, something the F-16 is not capable of. This helps the F-22 in performing maneuvers like the Cobra and Kulbit, which is not possible in F-16.
As a side note, the F-16 VISTA technology demonstrator (which had thrust vectoring) is considered super-maneuverable on par with THE F-22, though it had the same wing.