Yes, you can use the Yun pins instead of the second tpic chip, but you will need another 5 transistors, and these should be npn such as bc337.
The base pins of the PNP need to be pulled up to 12V, not 5V, otherwise they will never switch off. This means you cannot connect the Yun pins to the PNP bases, because they would be damaged by the 12V. So the 5 npn are needed between the Yun pins and the PNP bases. 4K7 between the Yun pins and the npn bases should be ok. You also need those 330R to limit the PNP base current.
