Atomic layer deposition of functional materials