As a software coder you have to understand that what you are designing is hardware not software. Leave the software paradigm behind and think in terms of 7400 series ICs and wires. Learn what structures in VHDL are synthesized to those parts to be able to code something that will actually make timing.
IMO VHDL n00bs should stay away from using functions, for loops, and generate until they are very familiar with how basic stuff like process, if-elsif, case, when, etc are synthesized. Then when you write a function you'll know how much logic you can get away with.