If it belongs to a library, I usually put them into the libraries folder and create a subfolder with the library's name (for example: I have a Notification library, then I create a folder in the libraries called Notification and put my own classes, interfaces etc. into that and I use require/include or an spl autoload function).
If it's anything else, then put it to application/third_party and put an spl_autoload to the front controller (main index.php).
If it is a complex stuff then create a PSR-4 compliant package and use composer's autoloader.