DCS may contract with the various counties of this state for the services and facilities necessary to operate pretrial release and diversion programs established under this article, and both DCS and the counties are authorized to enter into such contracts as are appropriate to carry out the purpose of this article.