Raid Masterworks can only be obtained from Raid drops and will never be awarded from Engrams or Vendors.
All Legendary armour will have a chance to drop as a Masterwork, with a higher drop rate from Raid activities and Trials of the Nine. Masterworks ArmourMasterworks armour will be added to Destiny 2 in patch 1.1.2 on January 30th.