In your Template File, it looks like get_terms
function is getting passed null data since the $taxonomies
object is just an array of strings, not an array of objects. In other words, try changing:
$terms = get_terms( $taxonomy->name );
to
$terms = get_terms( $taxonomy );