Joshua is not actually giving power to the Transformium. He finds that Transformium can be manipulated by programing the Transformium matter.
We write computer programs which controls the electrical signals inside devices of a computer to make them do tasks we need. As such, we can program Transformium matter and make them do whatever we want; like to change the shape.
Any and every Transformer has a Spark. This contains all the memory of a Transformer (as Optimus Prime describes in Transformers 4 movie) and it is also the controlling power of the Transformium within a Transformers body. Spark of a Transformer can be thought as the soul/mind (whether it is the soul or the mind is another question to be asked and we do not need to follow on it here) of a human which controls and powers the body. We believe the soul goes away or mind disappears when a human dies. As such, a Ttansformer will not live without a Spark.
Without a Spark, Transformium is not controlled and they will be divided into parts and lay on the ground since there is no authority to bind them together and make a form of a Transformer. This thing can be seen very well in the seen where the Jetfire dies.
So in the nature, the Spark powers up a Transformer and controls the Transformium. What Joshua does is controlling the Transformium using computer programs. So computer program does the controlling part of the Spark. But it doesn't powers up the man made Transformer. I'm sorry but I couldn't find any reliable source which describes the power source of a man made Transformer.
AllSpark in the other hand is a power source which can create, repair or re-energize a spark.