build_table function

Create a table from a layout and data