The operator ["/"][1] can be used for the concatenation by row of matrices. In this case
my $sp=$dense_unit_matrix/$ar; $sp=$sp/extended_matrix; $sp=$sp/$arr3;
works as well.
[1]: https://polymake.org/doku.php/user_guide/howto/matrix_classes#:~:text=GenericVector%26%2C%20const%20GenericVector%26)%3B-,Create%20a%20block%20matrix,-%2C%20virtually%20appending%20the