If you want to achieve "iw phy..." in C program - just look at "iw" program sources. Probably it is achieved by some ioctls or netlink.
Answers to your questions:
Virtual TUN/TAP device means that this device is independent of any hardware. It it only software solution. You cannot easily in userspace attach TUN/TAP device to wireless interface.
No, as I wrote in answer 1. the TUN/TAP is only virtual device and it cannot be converted to wifi device type.