USB Cables, no, what is connected to them might be.
Avast Scans USB devices, it doesn't scan the whole devices content when you plug it in, but if anything is transferred to your main system that content would be scanned in line with other newly created, modified or executed files on your system drive/s.
I have learned only recently that, USB cables and USB flash drives can hide malicious software and hardware that either install/download malware on to our PC
I don't know where you learnt this - you have me on how it is possible so store anything (malicious or otherwise) on a USB cable. It is inert, it has no storage means, no firmware or controllers. They need something to physically store (memory chip, etc.) the data on and be run from or executed.
Now a usb cable has to have a connector on either end, depending on the type of usb device it might be technically possible to have a chip secreted into something like a bulky connector. But that in itself would be a usb device and not a inert cable as such. In which case the same rules would applied as far as scanning by avast is concerned.
Until very recently I was not careful with cables and flash drives, I was getting and using all sort of cables and flash drives from all sort of different sources and brands. I really did not care.
So I guess avast has protected your system so far