There are certain factors which do indeed assist in making a rifle more accurate, but sometimes, you cannot make a silk purse out of a sow's ear, at least economically.
First and foremost, you should start with a platform that has a good reputation for accuracy. These days, some of the rifles that have that reputation are upper-end AR15s, Remington 700s, Savage Model 10s in the mass-produced category. Some vendors, like T-C and AWS offer guaranteed accuracy with match ammo. Rifles that have the opposite reputation would be most autoloaders (AKs, Mini-14s) and many single shot rifles (because of the way the forend is mounted).
The key to rifle accuracy is consistency. You want to be as consistent as possible in the areas of barrel harmonics, sight picture, and internal ballistics. You have already mentioned bedding and free-floating. These are techniques which are used to make barrel harmonics more consistent. Sight picture consistency is largely governed by shooter technique - cheek weld, trigger control, follow-through, etc. Internal ballistics is a statement on ammunition. You can have the most "accurate" rifle in the world, and if you feed it with crap ammo, it will shoot like crap.
There are many other factors that affect accuracy. Maybe some other members will post their thoughts. This could end up being a very long thread.