Tim Cook is NOT saying “I cant”. He is saying “I won’t”.
That means he can.
For the iPhone 5C, they probably could design and build a special version of iOS, but it would require a lot of work. Not easily for any later iPhone. However, there is the potential that once built, it could be modified for others. The point is that Apple is not a party to this investigation, nor is there a prosecution involved; all potential defendants at this time are dead.
Complying with the court's order, absent any other compelling reason, using just an "All Writs" order, would put Apple's entire ecosystem at risk of destruction. No one is being prosecuted. It's a fishing expedition. There is no legal reason why Apple should be forced to do something against their interest and the interests of their customers, and their stockholders, merely because law enforcement would like to know what's in that iPhone.