In an event of failure of all engines of a commercial aircraft in mid air and no secondary backup or generators powering the plane (plane is virtually powerless and no comp systems work on board), would the ATC still be able to detect the aircraft with accuracy and if yes how is it done ? Are there any conditions that it has to be flying in an area which is monitored or any basic stuff which HAS to be working for ATC to detect ?
That would be a very rare event. In the modern cases where this has happened within an ATC area, it has not prevented location of the aircraft so far as I know.
Even a two-engined airliner has an Auxiliary Power Unit (APU) and a Ram-Air Turbine(RAT). I believe they also typically have 10-15 minutes battery power for critical systems. I don't know if any airliner has ever lost all generators other than in cases where the aircraft was destroyed in flight (e.g. PanAm 103).
If an aircraft's transponder and secondary-radar are not operating, ATC would rely on primary radar, which is less accurate, particularly for altitude. They would also ask the pilots for their position over VHF radio and ask other aircraft in the area to locate the aircraft.
Example: British Airways Flight 9
All four engines flamed out due to ingestion of volcanic ash.
The pilot communicated with ATC over VHF radio and later restarted the engines.
Example Air Canada Flight 143 (the "Gimli Glider")
This 767 ran out of fuel mid-air and all engines stopped.
The pilot communicated with ATC Winnipeg and
So yes, If the aircraft with all engines out is in radar range and ATC are attentive, they can track the aircraft's location.
Primary radar (send out radio pulse and interpret reflections) was designed for this (detect uncooperative enemy aircraft).
A more complete explanation of this system can be found on the answers of this question.
Having said that, when all engines fail the backup is a Ram Air Turbine which gets deployed automatically and provides enough power for critical systems including controlling the craft, radio and transponder. Having every backup fail is extremely unlikely.
RAdio Detection And Ranging do not require active participation from the airplane, so ATC will still see it. However, ATC will not know of the plane's condition and will likely not be able to communicate with them.
Pretty much, if the craft is made out of metal and is reasonably high in the air, ATC will see it. Most non-metals will show up on radar as well, such as this guy.