Data Providers for setting appium capabilities?

Is there a way to use Data Providers for BeforeMethod function?
I would like to run parallel tests for number of different devices, so I would like to use parameters to setup capabilities. But I want to have a different way than using testng.xml.

Thank you for any help

You should take a look at running Appium on Selenium Grid: