GTX 1660 requires a 6 pin or 8 pin PCIe connector.  your upgraded psu of 400w should have this connector. To be on the safe side the maximum GPU length you can use on OptiPlex 790 is between 9.5 and 10.0 inches.   your zotac GTX 1660 twin fan is 8.5in x 4.38in x 1.39in.  It will fit easily.
[IMAGE] PC Specs: 400 watt PSU, 16 gigs of ram, Intel i5 2400, win 10. Was wondering if this GPU (gtx 1660) is compatible and if it is will it fit the case? 
GTX 1660 on optiplex 790 minitower