Self-assembling functionalized templates in biosensor technology